LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 04-08-2019, 06:45 AM   #1
arielma
LQ Newbie
 
Registered: Apr 2019
Posts: 8

Rep: Reputation: Disabled
Able to ping but not to run yum install commands


Hi
I'm able to ping to external websites, but for some reason, the sudo yum install command is not working due to connectivity issues. did anyone face it?
 
Old 04-08-2019, 07:27 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Which OS? If RH, may be due to subscription?
What is the exact output of yum command?
What is output of:

Code:
cat /etc/*release
yum repolist
yum install <package name>
 
Old 04-08-2019, 12:17 PM   #3
arielma
LQ Newbie
 
Registered: Apr 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
This is the input & output

Code:
$ sudo yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?releas...os&infra=stock error was
14: curl#56 - "Callback aborted"
^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?releas...us&infra=stock error was
14: curl#56 - "Callback aborted"
epel/x86_64/metalink                                                                |  25 kB  00:00:00
Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...as&infra=stock error was
14: curl#7 - "Failed connect to mirrorlist.centos.org:80; Operation now in progress"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...es&infra=stock error was
14: curl#7 - "Failed connect to mirrorlist.centos.org:80; Operation now in progress"
 * epel: www.mirrorservice.org
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
^Chttp://vault.centos.org/7.0.1406/os/x86_64/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
Trying other mirror.


 One of the configured repositories failed (CentOS-7.0.1406 - Base),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=C7.0.1406-base ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable C7.0.1406-base
        or
            subscription-manager repos --disable=C7.0.1406-base

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=C7.0.1406-base.skip_if_unavailable=true

failure: repodata/repomd.xml from C7.0.1406-base: [Errno 256] No more mirrors to try.
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://vault.centos.org/7.0.1406/os/...ta/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
$ Connection reset by 10.0.0.12 port 22

Last edited by arielma; 04-08-2019 at 12:52 PM.
 
Old 04-08-2019, 12:36 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Repeating #2
Code:
cat /etc/*release
yum repolist
please.
And please use code tags when posting output. It makes it much easier to read.
 
Old 04-08-2019, 01:50 PM   #5
arielma
LQ Newbie
 
Registered: Apr 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
I attached PrtScn of both commands

Please tell me if more info is needed
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	265
Size:	117.8 KB
ID:	30267   Click image for larger version

Name:	Capture2.PNG
Views:	179
Size:	125.5 KB
ID:	30268  
 
Old 04-08-2019, 02:15 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Ok. The errors are because you're configured to use the repositories for centos version 7.0.1406, and those repositories are no longer available.

You are at centos version 7.6.1810, so you need to update yum to use the repositories for that version.
Unfortunately, I'm not sure how to do that, but now that we've identified the root cause of the problem, hopefully someone with that knowledge will tell us both how to fix that problem.
 
Old 04-09-2019, 07:37 AM   #7
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
Try doing:

Code:
yum clean all
then try the previous yum commands again. The results of both the yum install and the yum repolist commands indicated an error communicating with the mirrorlist server. The yum repolist command indicates yum was attempting to use IPv6 for communication. You can force IPv4, by adding the following to the [main] section of /etc/yum.conf:

Code:
ip_resolve=4
 
1 members found this post helpful.
Old 04-09-2019, 12:48 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by sgrlscz View Post
Try doing:

Code:
yum clean all
then try the previous yum commands again. The results of both the yum install and the yum repolist commands indicated an error communicating with the mirrorlist server. The yum repolist command indicates yum was attempting to use IPv6 for communication. You can force IPv4, by adding the following to the [main] section of /etc/yum.conf:

Code:
ip_resolve=4
The error is because the mirrorlist url is no longer valid...the version is no longer supported. The link gives a 404 error when attempted manually.
What/where is the version on the OPs client set for yum? It's not the version they're actually running.
 
Old 04-09-2019, 01:56 PM   #9
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
Quote:
Originally Posted by scasey View Post
The error is because the mirrorlist url is no longer valid...the version is no longer supported. The link gives a 404 error when attempted manually.
What/where is the version on the OPs client set for yum? It's not the version they're actually running.
The mirrorlist URL is http://mirrorlist.centos.org/?releas...os&infra=stock, which is valid, and gives a simple text file. Each of the core CentOS repos has a similar mirrorlist URL, and they are all valid. The links giving the 404 errors are for vault.centos.org.

What would typically happen is that yum would connect to the mirrorlist URL and retrieve the current list and save it (e.g., some place like /var/cache/yum/x86_64/7/base/mirrorlist.txt). Then use that list to find the actual repo. If it fails to retrieve the mirrorlist.txt from mirrorlist.centos.org, it looks for a mirrorlist.txt for the repo in the yum cache, and continues with that.

In this case, the very first errors are that it cannot retrieve the current mirrorlist. The subsequent errors related to the vault.centos.org all look like the type of errors you see when the mirrorlist.txt in the cache is out of date.

So, if you do a 'yum clean all', there won't be anything in the cache to find after the initial failures.
 
1 members found this post helpful.
Old 04-09-2019, 02:20 PM   #10
arielma
LQ Newbie
 
Registered: Apr 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
sudo yum clean all didn't work

I also tried to install 2 different version..
 
Old 04-09-2019, 02:26 PM   #11
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
What errors are you getting?
 
Old 04-10-2019, 02:56 PM   #12
arielma
LQ Newbie
 
Registered: Apr 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
I didn't manage to work from VB

apparently, it's related to some security configuration (it's a company laptop). eventually, I managed to work and run sudo commands thought vagrant

Last edited by arielma; 04-10-2019 at 03:21 PM.
 
Old 04-10-2019, 03:05 PM   #13
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by arielma View Post
apparently, it's related to some security configuration (it's a company laptop). eventually, I managed to work and run sudo commands though vagrant
That should have been noted in your original post, at which time I (and probably others) would have referred you to your company's IT department.
 
Old 04-10-2019, 03:22 PM   #14
arielma
LQ Newbie
 
Registered: Apr 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Sorry for not mentioning it... will keep in mind for the next time
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am not able to login via ssh but able to ping my centos server. kumkum Linux - Newbie 7 09-21-2018 01:47 AM
I cannot ping with command 'ping IP' address but can ping with 'ping IP -I eth0' sanketmlad Linux - Networking 2 07-15-2011 05:32 AM
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg0000 Fedora 8 04-13-2011 11:25 AM
Not able to browse web pages, but able to ping domain names joe2748 Linux - General 2 11-03-2007 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration