LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-15-2015, 02:59 PM   #1
brh1
LQ Newbie
 
Registered: Sep 2012
Location: Texas
Posts: 24

Rep: Reputation: Disabled
Yum updater does not work, no repolist on my CentOS system.


Good day all.

I've installed CentOS 7 on a VM without any noticeable problems. However, when trying to update the system, I found that yum updater does not work. It seems I do not have any repos defined.

Code:
[root@centos7 brh]# yum check-update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>
No repos:

Code:
[root@centos7 brh]# yum repolist all
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Also,my yum.conf has no repo mirrors defined:

Code:
[root@centos7 brh]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release


#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
How can I get a valid repolist?

Thanks in advance,

Bjoern
 
Old 09-15-2015, 06:57 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
You have to enable the EPEL Repo-

See this link:
http://www.tecmint.com/how-to-enable...el-centos-6-5/
 
Old 09-15-2015, 08:14 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
@brh1, the repo`s are not defined in /etc/yum.conf . Never.

'yum' will look for repo files in /etc/yum/repos.d/, where the enabled file is CentOS-Base.repo .
Attached as CentOS7-Base.repo.txt .

Extra repo`s : Simply add a file, e.g. 'epel.repo' :
# yum install Downloads/epel-release-7-5.noarch.rpm
https://dl.fedoraproject.org/pub/epe...7-5.noarch.rpm
Ref. https://fedoraproject.org/wiki/EPEL

-
Attached Files
File Type: txt CentOS7-Base.repo.txt (1.6 KB, 1015 views)

Last edited by knudfl; 09-15-2015 at 08:23 PM.
 
Old 09-16-2015, 07:51 AM   #4
brh1
LQ Newbie
 
Registered: Sep 2012
Location: Texas
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
@brh1, the repo`s are not defined in /etc/yum.conf . Never.

'yum' will look for repo files in /etc/yum/repos.d/, where the enabled file is CentOS-Base.repo .
Attached as CentOS7-Base.repo.txt .

Extra repo`s : Simply add a file, e.g. 'epel.repo' :
# yum install Downloads/epel-release-7-5.noarch.rpm
https://dl.fedoraproject.org/pub/epe...7-5.noarch.rpm
Ref. https://fedoraproject.org/wiki/EPEL

-
Thanks for your reply knudfl.

I made a directory /etc/yum/repos.d and dropped the repo file you attached in it. Here's the yum check-update result:
Code:
[root@centos7 repos.d]# yum check-update
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base                                                                                                              | 4.8 kB  00:00:00     
http://mirror.millry.co/CentOS/7.0.1406/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.
All the other mirrors failed with Errno -1

Bjoern
 
Old 09-16-2015, 07:58 AM   #5
brh1
LQ Newbie
 
Registered: Sep 2012
Location: Texas
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
You have to enable the EPEL Repo-

See this link:
http://www.tecmint.com/how-to-enable...el-centos-6-5/
Thanks for your reply Ztcoracat.

I tried your method, downloading the rpm was no problem, but the installation failed:
Code:
[root@centos7 repos.d]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
--2015-09-16 07:54:00--  http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.23, 209.132.181.24, 209.132.181.26, ...
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 302 Not Allowed
Location: http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html [following]
--2015-09-16 07:54:00--  http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html
Resolving cso.att.com (cso.att.com)... 135.53.21.118
Connecting to cso.att.com (cso.att.com)|135.53.21.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4877 (4.8K) [text/html]
Saving to: ‘epel-release-7-5.noarch.rpm’

100%[===============================================================================================>] 4,877       --.-K/s   in 0s      

2015-09-16 07:54:00 (626 MB/s) - ‘epel-release-7-5.noarch.rpm’ saved [4877/4877]

[root@centos7 repos.d]# rpm -ivh epel-release-7-5.noarch.rpm
error: open of <!DOCTYPE failed: No such file or directory
error: open of html failed: No such file or directory
error: open of PUBLIC failed: No such file or directory..........

Bjoern
 
Old 09-16-2015, 11:01 AM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
Quote:
Originally Posted by brh1 View Post
Thanks for your reply Ztcoracat.

I tried your method, downloading the rpm was no problem, but the installation failed:
Code:
[root@centos7 repos.d]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
--2015-09-16 07:54:00--  http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.23, 209.132.181.24, 209.132.181.26, ...
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 302 Not Allowed
Location: http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html [following]
--2015-09-16 07:54:00--  http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html
Resolving cso.att.com (cso.att.com)... 135.53.21.118
Connecting to cso.att.com (cso.att.com)|135.53.21.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4877 (4.8K) [text/html]
Saving to: ‘epel-release-7-5.noarch.rpm’

100%[===============================================================================================>] 4,877       --.-K/s   in 0s      

2015-09-16 07:54:00 (626 MB/s) - ‘epel-release-7-5.noarch.rpm’ saved [4877/4877]

[root@centos7 repos.d]# rpm -ivh epel-release-7-5.noarch.rpm
error: open of <!DOCTYPE failed: No such file or directory
error: open of html failed: No such file or directory
error: open of PUBLIC failed: No such file or directory..........

Bjoern
Sorry it failed.
It may have failed because the extras were disabled?

Try this:
Code:
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo rpm -Uvh epel-release-7*.rpm
Instructions are in the second link.

https://www.centos.org/docs/5/html/y...ositories.html
http://www.rackspace.com/knowledge_c...os-and-red-hat
 
Old 09-16-2015, 11:57 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #4.
Quote:
I made a directory /etc/yum/repos.d/
There are some indications in your post that some other folders / files are missing in /etc/.
? How did you get your OS messed up ?
( /etc/yum/repos.d/ is always present after the OS install.)


-
 
Old 09-16-2015, 01:14 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
Quote:
I made a directory /etc/yum/repos.d
knudfl has a point

WTF

that folder IS!!! a default folder
it WAS made at the time of install
it IS part of the Operation system


it is like saying that "C:\\Program Files (x86)\Common Files" is missing on a windows machine

REINSTALL this severely broken OS
 
Old 09-17-2015, 12:32 PM   #9
brh1
LQ Newbie
 
Registered: Sep 2012
Location: Texas
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
knudfl has a point

WTF

that folder IS!!! a default folder
it WAS made at the time of install
it IS part of the Operation system


it is like saying that "C:\\Program Files (x86)\Common Files" is missing on a windows machine

REINSTALL this severely broken OS
I just now did a new installation of CentOS 7 from an ISO (CentOS-7.0-1406-x86_64-DVD.iso). There IS NO!!! /etc/yum/repos.d:
Code:
[brh@localhost yum]$ ls -la /etc/yum
total 28
drwxr-xr-x.   6 root root 4096 Sep 17 06:55 .
drwxr-xr-x. 132 root root 8192 Sep 17 12:10 ..
drwxr-xr-x.   2 root root    6 Jun 27  2014 fssnap.d
drwxr-xr-x.   2 root root   52 Sep 17 07:01 pluginconf.d
drwxr-xr-x.   2 root root   25 Sep 17 06:55 protected.d
drwxr-xr-x.   2 root root    6 Jun 27  2014 vars
-rw-r--r--.   1 root root  444 Jun 27  2014 version-groups.conf
-rw-r--r--.   1 root root 2537 Jun 27  2014 yum-cron.conf
-rw-r--r--.   1 root root 2499 Jun 27  2014 yum-cron-hourly.conf
[brh@localhost yum]$
 
Old 09-17-2015, 12:55 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,402

Rep: Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548
That is correct, there isn't a /etc/yum/repos.d. It changed in version 7. Did anyone read the 1st post?

Quote:
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
I assume that yum is working since you reinstalled?

Last edited by michaelk; 09-17-2015 at 01:02 PM.
 
Old 09-17-2015, 02:04 PM   #11
brh1
LQ Newbie
 
Registered: Sep 2012
Location: Texas
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
That is correct, there isn't a /etc/yum/repos.d. It changed in version 7. Did anyone read the 1st post?



I assume that yum is working since you reinstalled?

Nope. Now it barfed a different error message:

Code:
[root@localhost brh]# yum check-update
Loaded plugins: fastestmirror, langpacks


 One of the configured repositories failed (Unknown),
 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. Disable the repository, 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 <repoid>

     4. 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=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64
 
Old 09-17-2015, 02:53 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,402

Rep: Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548
What virtual software are you running i.e. vmware, virtualbox etc.

How did you configure the VM network adapter?
 
Old 09-18-2015, 12:16 AM   #13
brh1
LQ Newbie
 
Registered: Sep 2012
Location: Texas
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
What virtual software are you running i.e. vmware, virtualbox etc.

How did you configure the VM network adapter?
Running on VMware Player v6 and network adapter setup for NAT. I have no issues with this VM on another PC at home. I'll just have to do a 'stare-and-compare' as soon as I get the opportunity.

Bjoern
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
yum repolist issue (yum not working on Centos 5) sanjay2004 Programming 10 02-26-2014 05:57 AM
how to update rhel 5 using centos yum updater without conflict with yum redhat plugin udayvikram Linux - Software 2 03-30-2010 08:15 AM
how to update rhel 5 using centos yum updater without conflict with yum redhat plugin udayvikram Linux - Newbie 1 03-29-2010 12:56 PM
[centos] yum and software updater pcandpc Linux - Distributions 1 04-26-2007 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:45 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