Linux下常见问题及解决方案

(一)$_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

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

 

默认情况下,我们的red hat企业版若没有授权(要收费),是不能使用yum的(我现在用的是rhel 5.1),
使用yum这个命令时出现报错: bash: yum: command not found。
很难想象没有yum的日子:),下面是解决这个问题的详细步骤:
1、下载yum软件
2、解压
tar xzvf yum_forAS4.tar.gz
3、进入解压后的目录
cd yum_forAS4

4、安装软件
rpm -ivh *.rpm
5、下载附件CentOS-Base.repo.zip 到/etc/yum.repo.d/

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

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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值