1、问题如下:
CentOS yum时出现“Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error ”错误:
[root@server mysql-5.0.56]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Error: Cannot find a valid baseurl for repo: addons
2、出现问题原因:
公司统一通过代理上网,我在自己电脑的虚拟机上安装了Linux服务器,因此在虚拟机里面设代理,电脑ip为xxx.xxx.xxx.xx,其中http端口8080.
3、解决方式:
如果只是暂时使用代理,在命令行输入下面一条命令: export http_proxy=“http://192.168.1.XX:8080”
如果是通过ip或电脑的网卡地址认证,可忽略所有username 和 password .
转载:https://blog.csdn.net/fwj380891124/article/details/39642877/