Page 1 of 1

Can`t download with yum on Linux CentOS

Posted: 2019/08/30 10:28:01
by serban123
I installed Linux CentOS on a virtualbox. The internet connection is thru proxy but I understood I have to modifiy resolv.conf. I added the proxy, username and password and then I tested with the command : yum repolist and I get this :

Loaded plugins: fastesmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
14:curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Loading mirror speed from cached hostfile
Loading mirror speed from cached hostfile
Loading mirror speed from cached hostfile
repo id repo name
base/7/x86_64 CentOS -7- base
extras/7/x86_64 CentOS -7- extras
updates/7/x86_64 CentOS -7- updates
repolist: 0

What does this error mean ? And what do I have to do to download with yum.

Thanks in advance

Re: Can`t download with yum on Linux CentOS

Posted: 2019/08/30 11:05:27
by TrevorH
I installed Linux CentOS on a virtualbox. The internet connection is thru proxy but I understood I have to modifiy resolv.conf. I added the proxy, username and password and then I tested with the command : yum repolist and I get this :
No, /etc/resolv.conf is not the correct place to add proxy details. That should only contain lines starting with keyards like search/domain/nameserver.

The correct place to put proxy details for yum is in /etc/yum.conf. You can find details of what you need to add by running man yum.conf and searching it for "proxy".