您的位置:首页 > 运维架构 > Linux

Linux下常见问题及解决方案

2012-05-30 13:48 288 查看
(一)$_path/*: cannot restore segment prot after reloc: Permission denied.

chcon -t texrel_shlib_t $_path/*

(二)configure: error: libtermcap, libcurses or libncurses are required!

安装 libtermcap, ncurses-devel这个软件包

yum install libtermcap

yum install ncurses-devel

一般缺少x_name,就安装x_name:yum install x_name(联网)

(三) 安装Nginx时报错

./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题

yum -y install pcre-devel

错误提示:./configure: error: the HTTP cache module requires md5 functions

from OpenSSL library. You can either disable the module by using

--without-http-cache option, or install the OpenSSL library into the system,

or build the OpenSSL library statically from the source with nginx by using

--with-http_ssl_module --with-openssl=<path> options.

解决办法:

yum -y install openssl openssl-devel

(四)安装jsoncpp linux

#tar -zxf scons-2.1.0.tar.gz
#cd scons-2.1.0
#python setup.py install
#tar -zxf jsoncpp-src-0.5.0.tar.gz
#cd jsoncpp-src-0.5.0
#scons platform=linux-gcc
#mv libs/linux-gcc-4.1.2/libjson_linux-gcc-4.1.2_libmt.so /lib (gcc版本可能不同)
#mv include/json/ /usr/include/
#ldconfig
#./bin/linux-gcc-4.1.2/test_lib_json

(五)red hat不能使用yum软件的解决办法

默认情况下,我们的red hat企业版若没有授权(要收费),是不能使用yum的(我现在用的是rhel 5.1),
使用yum这个命令时出现报错: bash: yum: command not found。
很难想象没有yum的日子:),下面是解决这个问题的详细步骤:

1、下载yum软件
wget http://www.parallels.com.cn/downloads/Prima/Tools/yum_forAS4.tar.gz
2、解压
tar xzvf yum_forAS4.tar.gz

3、进入解压后的目录
cd yum_forAS4

4、安装软件
rpm -ivh *.rpm

5、下载附件CentOS-Base.repo.zip 到/etc/yum.repo.d/


CentOS-Base.repo.zip


6、 在 /etc/yum.repo.d/ 解压CentOS-Base.repo.zip, 得到CentOS-Base.repo
unzip CentOS-Base.repo.zip

7. 导入key

#rpm –import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
8. 运行,测试

#yum update
9、一个例子,比如我们现在要安装一个叫做git的版本控制工具,先list出来吧:)
[leijianfeng@localhost ~]$ yum list| grep ^git

git.i386 1.7.3-1.el5.rf dag

git-all.i386 1.7.3-1.el5.rf dag

git-arch.i386 1.7.3-1.el5.rf dag

git-cvs.i386 1.7.3-1.el5.rf dag

git-daemon.i386 1.7.3-1.el5.rf dag

git-email.i386 1.7.3-1.el5.rf dag

git-gui.i386 1.7.3-1.el5.rf dag

git-svn.i386 1.7.3-1.el5.rf dag

gitk.i386 1.7.3-1.el5.rf dag

gitweb.i386 1.7.3-1.el5.rf dag

然后我们输入:yum install git.i386
就可以安装好git这个现在很火的版本控制工具啦!

说明:
若在安装软件的时候,出现key失效,或者key太老的警告,则按如下步骤解决

解决方法:

1、关闭验证:打开CentOS-Base.repo,设置gpgcheck=0,默认为1;

2、导入以下

rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm –import http://quattor.web.lal.in2p3.fr/packages/os/sl520-x86_64/base/RPM-GPG-KEYs/RPM- GPG-KEY-CentOS-5
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: