在linux中安装应用程序时出现的问题
来源:互联网 发布:手机优化软件排名第一 编辑:程序博客网 时间:2024/03/29 04:34
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中安装应用程序时出现的问题
- 在linux中安装应用程序时出现的问题
- linux中安装程序出现的问题
- 在Linux中Oracle安装成功后,首次启动使用时,会出现的一些问题总结和解决办法
- [记录]在Linux中Oracle安装成功后,首次启动使用时,会出现的一些问题总结和解决办法
- 在Linux中Oracle安装成功后,首次启动使用时,会出现的一些问题总结和解决办法
- 在Linux中Oracle安装成功后,首次启动使用时,会出现的一些问题总结和解决办法
- Mysql在Linux下安装和使用过程中出现的问题及解决方案
- oracle在linux下的安装出现的小问题
- 在Linux下 安装 License Manager 出现的问题
- 在虚拟机上安装red hat linux出现的问题
- 在linux安装出现的有关问题与解决方案
- 怎么样才能在linux中安装应用程序?
- 如何在Linux中安装应用程序
- 在虚拟机中安装centos可能出现的问题
- SQL2012在win8系统中安装出现的问题
- 在linux环境中安装rabbitmq出现的错误
- Qt学习(复制linux在虚拟机中出现的问题)
- VC中建立程序的关联文件
- linux下的mysql
- 看论文积累 发现错误
- yum
- Oracle11gR2 32-bit on SLES11 x86安装技术文档(原版英文)
- 在linux中安装应用程序时出现的问题
- YUM
- lamp环境安装需要细节步骤(mysql、apache、php等等)
- IE和FireFox中的textarea长度限制
- linux中安装程序出现的问题
- linux下的mysql
- 20111227王英贺工作总结
- JDK 7探秘系列(一):新的语言特性
- Strategy设计模式