linux遇到的一些问题及解决办法

1、yum找不到可用mirror   

yum clean all

yum makecache

gcc c++编译器安装

再debian下直接apt-get install gcc g++就可以了。按照类似的逻辑,再Fedora下yum install gcc g++ 报告无法找到g++包。

查了一下,原来这个包的名字叫做gcc-c++。完整的应该是yum install gcc gcc-c++。

安装phpize:

yum install php-devel然后就会安装上phpize了

报错:

The GPG keys listed for the "CentOS / Red Hat Enterprise Linux 6 -atomicrocketturtle.com" repository are already installed but theyare not correct for this package.
Check that the correct key URLs are configured for thisrepository.

此时只要加上“--nogpgcheck”就可以了,即去掉gpg检查,
如“yum install php-mcrypt --nogpgcheck”

最后还得重启一下服务器
service nginx restart


5、bash:xx command   not  found

环境变量的原因:

修改/etc/profile或者 修改用户主目录下的.bashrc文件

vi /etc/profile

添加用到的命令所在目录    如: export PATH=/sbin:$PATH

注销账户,重新登录。

最后,echo $PATH查看修改结果

6、创建和删除软连接

创建   ln -sf  /usr/local/xxx  /usr/local/bin/xxx

删除  rm  usr/local/bin/xxx


7、清除linux日志

1.删除所有的日志:find   /var   -type   f   -exec   rm   -v   {}   \;

启动php-fpm    service php-fpm start


8、yum 安装软件时出错,错误信息如下

Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

解决办法:http://blog.sina.com.cn/s/blog_541a3cf10101h245.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值