linux中安装程序出现的问题
2011-12-27 21:26
274 查看
1、centos5.5里安装软件时发现了访问权限的问题:
SELinux和iptables
cannot restore segment prot after reloc: Permission denied
############################
在red hat linux上安装有些东西时会出现 Permission denied 的情况:以下就是解决它的办法之一
编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
就应该是SELinux的问题,可以考虑把它关闭。
如果把SELinux关闭后还是不行.执行如下步骤即可
在你保证SElinux 被disable后.还执行下
chcon -t texrel_shlib_t
如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.)
以上两步.已经解决了很多server的问题了.
2、 这里显示一个错误信息:
checking for LIBXML2... configure: error: Package requirements (libxml-2.0 >= 2.6) were not met:
No package 'libxml-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBXML2_CFLAGS
and LIBXML2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
但是我们在上面其实已经安装上 libxml2 了的,这里只是一个 环境变量没有设置好而已。
解决办法: 确定 /usr/local/libxml2/lib/pkgconfig 目录下有 libxml-2.0.pc
export PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH
再次生成 makefile , 这样就成功了
3、
CentOS 5.5上安装PHP,结果configure的时候错误了。命令行下提示:
configure: error: build test failed. Please check the config.log for details.
下载config.log,最后的信息是:
configure:20548: checking for xml2-config path
configure:20706: checking whether libxml build works
configure:20733: gcc -o conftest -g -O2 -Wl,-rpath,/home/wulijun/lib/lib -L/home/wulijun/lib/lib conftest.c
-lrt -lresolv -lm -ldl -lnsl -lrt -lxml2 -lz -liconv -lm 1>&5
configure: failed program was:
#line 20722 "configure"
#include "confdefs.h"
char xmlInitParser();
int main() {
xmlInitParser();
return 0;
}
解决方法如下:
1)在PHP源码下面创建文件conftest.c,内容为config.log中的提示内容:
#include "confdefs.h"
char xmlInitParser();
int main() {
xmlInitParser();
return 0;
}
2)使用提示中的:
gcc -o conftest -g -O2 -Wl,-rpath,/home/wulijun/lib/lib -L/home/wulijun/lib/lib conftest.c
-lrt -lresolv -lm -ldl -lnsl -lrt -lxml2 -lz -liconv -lm
命令对conftest.c进行编译,如果编译出现错误,那么这个错误就是PHP无法编译的一个原因,需要先解决。
3)执行刚才编译出来的conftest,如果没有执行权限需要先加上(这一步是从configure这个脚本里看到的,他检查时就是这么做的)。如果报错,那么这个错误也是PHP无法编译的原因。我的情况就是这个,执行后提示:./conftest: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
SELinux和iptables
cannot restore segment prot after reloc: Permission denied
############################
在red hat linux上安装有些东西时会出现 Permission denied 的情况:以下就是解决它的办法之一
编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
就应该是SELinux的问题,可以考虑把它关闭。
如果把SELinux关闭后还是不行.执行如下步骤即可
在你保证SElinux 被disable后.还执行下
chcon -t texrel_shlib_t
如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.)
以上两步.已经解决了很多server的问题了.
2、 这里显示一个错误信息:
checking for LIBXML2... configure: error: Package requirements (libxml-2.0 >= 2.6) were not met:
No package 'libxml-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBXML2_CFLAGS
and LIBXML2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
但是我们在上面其实已经安装上 libxml2 了的,这里只是一个 环境变量没有设置好而已。
解决办法: 确定 /usr/local/libxml2/lib/pkgconfig 目录下有 libxml-2.0.pc
export PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH
再次生成 makefile , 这样就成功了
3、
CentOS 5.5上安装PHP,结果configure的时候错误了。命令行下提示:
configure: error: build test failed. Please check the config.log for details.
下载config.log,最后的信息是:
configure:20548: checking for xml2-config path
configure:20706: checking whether libxml build works
configure:20733: gcc -o conftest -g -O2 -Wl,-rpath,/home/wulijun/lib/lib -L/home/wulijun/lib/lib conftest.c
-lrt -lresolv -lm -ldl -lnsl -lrt -lxml2 -lz -liconv -lm 1>&5
configure: failed program was:
#line 20722 "configure"
#include "confdefs.h"
char xmlInitParser();
int main() {
xmlInitParser();
return 0;
}
解决方法如下:
1)在PHP源码下面创建文件conftest.c,内容为config.log中的提示内容:
#include "confdefs.h"
char xmlInitParser();
int main() {
xmlInitParser();
return 0;
}
2)使用提示中的:
gcc -o conftest -g -O2 -Wl,-rpath,/home/wulijun/lib/lib -L/home/wulijun/lib/lib conftest.c
-lrt -lresolv -lm -ldl -lnsl -lrt -lxml2 -lz -liconv -lm
命令对conftest.c进行编译,如果编译出现错误,那么这个错误就是PHP无法编译的一个原因,需要先解决。
3)执行刚才编译出来的conftest,如果没有执行权限需要先加上(这一步是从configure这个脚本里看到的,他检查时就是这么做的)。如果报错,那么这个错误也是PHP无法编译的原因。我的情况就是这个,执行后提示:./conftest: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
相关文章推荐
- 今天刚安装了linux redhat6.4 在打开的Firefox的时候报错:无法初始化应用程序安全组件。很有可能您的程序个人目录中的文件出现问题。请检查
- Linux下安装MyEclipse和Tomcat服务器详解,以及我安装过程中所出现的问题以及解决办法,并实现一个web小程序
- 解决安装使用Applocale后, 其他软件或安装程序出现乱码的问题
- linux 下安装MySQL出现问题 Access denied for user ''@'localhost' to database 'mysql'
- java程序在linux下出现的乱码问题
- 关于安装.NET Framework 2.0时偶然碰到的问题(提示"Error 205015. 安装程序集..../System.EnterpriseServices.dll失败,原因是出现了系统错误:拒绝访问。")
- 安装itunes出现无法定位程序输入点(QTCF)的问题解决方法
- android自动更新程序,安装完以后就什么都没有了,没有出现安装成功的界面的问题
- 安装了vs 2012之后打开excel时出现"向程序发送命令时出现问题“
- VS2008调试程序时出现“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”的解决办法
- Windows 安装IIS出现的问题(无法安装IIS,提示“安装程序无法复制文件IISApp.vbs”)
- android自动更新程序,安装完成后没有出现安装成功的界面的问题
- Linux数据安装出现的问题
- Linux 安装oracle11g 出现的问题及解决方案
- win7C++程序移植到Linux出现的问题
- 解决Linux下安装thrift出现的Building Java Library ........ : no问题(以及其他安装thrift出现的问题)
- Linux 初步安装出现的问题以及解决流程
- 在vmware fusion上安装linux系统然后再安装vmware tools出现问题
- WIN7 64位系统Delphi6安装EhLib【向程序发送命令时出现问题】