broken yum and add/remove software

Issues related to applications and software problems
cchelten
Posts: 3
Joined: 2012/02/27 02:31:50

broken yum and add/remove software

Postby cchelten » 2012/02/27 02:40:37

Here is one of those situation where I shot myself in the foot. Unfortunetly , I do not know how to fix this.
When I try to ues yum it says the following:

[root@localhost ~]# yum -y install java-1/6/0
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirror.symnds.com
* c6-media:
* extras: mirror.lug.udel.edu
* updates: mirror.ash.fastserv.com
file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/CentOS/repodata/repomd.xml
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrecorder/repodata/repomd.xml
Trying other mirror.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its path and try again

No clue what that is .. same with the add /remove software thing.

I was earlier playing with the system/software sources pull down in add/remove.

How can I fix this?

I have ben trying for a few hours without luck.

Thanks for your help

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: broken yum and add/remove software

Postby pschaff » 2012/02/27 03:23:06

You have edited /etc/yum.repos.d/CentOS-Media.repo and set it to enabled by default. Edit it again and change "enabled=1" to "enabled=0".

Don't use "yum -y" or you may regret it when it does something you did not want. Inspect the proposed changes first. Try

Code: Select all

yum list java-1.6.0\*
to see what is available and

Code: Select all

yum install java-1.6.0\*
if you want to proceed with all available packages.

josemanuel1974
Posts: 13
Joined: 2010/12/17 08:24:42

Re: broken yum and add/remove software

Postby josemanuel1974 » 2012/02/27 08:09:52

¿Are you using a proxy? -> $http_proxy

cchelten
Posts: 3
Joined: 2012/02/27 02:31:50

Re: broken yum and add/remove software

Postby cchelten » 2012/02/27 17:31:48

Actually I found my fix on another forum.
No proxy and you can use yum -y all it does is answer yes to the question.
I have done it a hundred times.

I have attched my notes for the fix, however it is in openoffice format.
MS Word probably cannot open it.

gerald_clark
Posts: 10393
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

broken yum and add/remove software

Postby gerald_clark » 2012/02/27 17:50:23

Actually, you were given the fix in post #2.
Yes, you can use yum -y, but someday you will be sorry you did.

You appear to be not reading the responses.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: broken yum and add/remove software

Postby pschaff » 2012/02/27 22:58:37

cchelten wrote:
No proxy and you can use yum -y all it does is answer yes to the question.

We know that. You have been lucky, or have not yet noticed the damage. Consider what would happen if you did

Code: Select all

yum -y remove rpm
or inadvertently enabled some dangerous repo (e.g. Atomic) that wholesale replaces core packages and then did

Code: Select all

yum -y update

I have attched my notes for the fix, however it is in openoffice format.
MS Word probably cannot open it.

The forum attachment function is permanently broken and a review of Readme First will tell you how to handle it. Copying/pasting the text in-line, or if too long using a pastebin, would be far preferred to a word processor file in any format.


Return to “CentOS 6 - Software Support”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests