代理上网中Linux下YUM无法使用的解决方法

背景:公司的电脑是通过代理上网的,,VMware下一台CentOS 6.5_64的系统,网络模式为NAT。可以ping的通外网,但是yum安装东西总是报错,如下图

[[email protected] ~]#yum list Loaded plugins: fastest, refresh-packagekit, securitySetting up Remove ProcessNo Match for argument: mysql-serverLoading mirror speeds from cached hostfileCould not retrieve mirrorlist release=6&arch=x86_64&repo=os&infra=stock error was14: PYCURL ERROR 7 – “Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable”Error: Cannot find a valid baseurl for repo: base [[email protected] ~]#

解决办法:在宿主机上ping代理上网的网站获取IP地址

在Linux机器中做以下操作:[[email protected] ~]# vim /etc/profile [[email protected] ~]# tail -3 /etc/profile export http_proxy=10.14.36.103:8080 export https_proxy=10.14.36.103:8080 [[email protected] ~]# source /etc/profile [[email protected] ~]#

再执行yum

已解决!

RedHat 6.2 Linux修改yum源免费使用CentOS源

配置EPEL YUM源

Redhat 本地yum源配置

yum的配置文件说明

RedHat 6.1下安装yum(图文)

YUM 安装及清理

CentOS 6.4上搭建yum本地源

本文永久更新链接地址:

也就越容易失败,还不如怀揣一颗平常心,“但行好事,莫问前程”,往往成功的几率反而更大些

代理上网中Linux下YUM无法使用的解决方法

相关文章:

你感兴趣的文章:

标签云: