LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2011, 03:20 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
Add/Remove software problem in CentOS 5.


Hi,
I am using centOS 5 on my system.When I try to add or remove a software by "Add/Remove Software" it show me an error message.Kindly find the attachment herewith.

Regards,
garden
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	35
Size:	61.0 KB
ID:	7438  

Last edited by gardenair; 07-01-2011 at 03:52 AM.
 
Old 07-01-2011, 04:23 AM   #2
csravi88
LQ Newbie
 
Registered: Jun 2010
Distribution: RHEL, CentOS, Debian, AIX
Posts: 15

Rep: Reputation: 0
you might not connected to internet.

have you configured your yum to use local repository?
 
Old 07-01-2011, 05:32 AM   #3
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
yes I know. I does not want to connect the system with internet.I want to disable this feature that the system should not check it through internet. There is a place# cd /etc/yum.repos.d directory and in CentOS 5 there are two files in it i.e

CentOS-Base.repo
CentOS-Media.repo

I am also using Fedora 7 in my 2nd PC and i also want same solution for it also (should be thankful).
In Fedora 7 there is

fedora-development.repo
fedora-updates-testing.repo
fedora-updates.repo
fedora.repo


In short I just want that the system should not go to internet and for any changes I use my DVD .Like I want to uninstall openoffice and install vim editor (Just for example) so how can I disable settings in the files and redirect it to my DVD ?

Thanks
garden
 
Old 07-01-2011, 11:29 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,139

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Firstly, edit each repository file and change "enabled=1" to "enabled=0". That will stop yum trying to go online. Then create file /etc/yum.repos.d/dvd.repo containing these lines:

[dvd]
name=dvd
baseurl=file://media/***
enabled=1
gpgcheck=0

Replace *** by whatever your DVD gets called when mounted. Thus the Fedora 10 DVD appears as "Fedora 10 i386 DVD" and so you have "Fedora\ 10\ i386\ DVD" (with "\" to prevent the spaces causing trouble).
 
Old 07-03-2011, 10:57 PM   #5
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks "DavidMcCann" for your kind reply. Well I have made changes as I understand according to your post. Unfortunately when I click on "Add/Remove Software" it show me an error. I have also changed the file "fedora.repo" and one of its head from "enabled=1" to "enabled=0".There are more heads which are already "0" but it is confusing me that it will be used for my task or not.

Code:
[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[fedora-source]
name=Fedora $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

I have also create /etc/yum.repos.d/dvd.repo file and
Code:
[dvd]
name=dvd
baseurl=file://media/Fedora\7\i386\DVD
enabled=1
gpgcheck=0

Well Iam attaching the "fedora.repo"(if you think to change something more in this file) and the error snapshot so you my easily understand the problem.

thanks a lot
garden
Attached Thumbnails
Click image for larger version

Name:	error.jpg
Views:	19
Size:	47.5 KB
ID:	7460  

Last edited by gardenair; 07-03-2011 at 10:59 PM.
 
Old 07-04-2011, 10:52 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,139

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
You got the address wrong. The backslashes are placed before the spaces: they are not supposed to replace them.
 
Old 07-04-2011, 06:55 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
FYI, F7 hasn't been updated in yrs; try F14.
 
Old 07-04-2011, 11:29 PM   #8
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
I have an old pc thats is why i am using FC 7. "DavidMcCann" can you elaborate "The backslashes are placed before the spaces:"

Code:
[dvd]
name=dvd
baseurl=file://media/ ???????
enabled=1
gpgcheck=0
Regards
garden
 
Old 07-05-2011, 07:14 AM   #9
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by gardenair View Post
can you elaborate "The backslashes are placed before the spaces
Well, you put backslashes before the spaces. Whenever there's a space in a filename, but a backslash before it so that the shell treats itas a literal character instead of a seperator.

Basically, putting a backslash in front of any special character in bash will make it a literal character.

Last edited by MTK358; 07-05-2011 at 07:17 AM.
 
Old 07-06-2011, 01:15 AM   #10
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks "MTK358" for the reply. Well still yet there is an ambiguity to do it piratical. As you mention in the post
"you put backslashes before the spaces. Whenever there's a space in a filename, but a backslash before it so that the shell treats itas a literal character instead of a separator."

I shell be too moch thankfull if do write the procedure.As i understand I write please make necessary correction so I may implement on the system

Code:
[dvd]
name=dvd
baseurl=file://media/Fedora\7\i386\DVD
enabled=1
gpgcheck=0
 
Old 07-06-2011, 05:23 AM   #11
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by gardenair View Post
please make necessary correction so I may implement on the system
Code:
[dvd]
name=dvd
baseurl=file://media/Fedora\7\i386\DVD
enabled=1
gpgcheck=0


But backslashes BEFORE the spaces, don't replace spaces with backslashes! Is it really that hard to understand?!?
 
Old 07-07-2011, 04:27 AM   #12
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Well thanks

Code:
[Fedora-DVD]
name=Fedora 7 DVD
baseurl=file:///media/Fedora\ 7\ i386\ DVD/
enabled=1
gpgcheck=0
then
Code:
# yum clean all
Loading "installonlyn" plugin
Options Error:Error parsing 'file:///Fedora\\ 7\\ i386\\ DVD/' : URL must be http,ftp,file or http not ""
Still can not change any software from add/remove software

Last edited by gardenair; 07-07-2011 at 04:40 AM.
 
Old 07-07-2011, 04:51 AM   #13
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It's not possible to put spaces in the baseurl. Your best option is to create a symbolic link to the mountpoint and use that instead, e.g.
Code:
ln -s "/media/Fedora 7 i386 DVD" /media/Fedora7
then
Code:
baseurl=file:///media/Fedora7
 
Old 07-07-2011, 05:14 AM   #14
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Just before doing as u mentionedin the post I have made some little changes in my system.I remove spaces as following

Code:
[Fedora-DVD]
name=Fedora 7 DVD
baseurl=file:///media/Fedora\7\i386\DVD/
enabled=1
gpgcheck=0
Then i go

Code:
[root@localhost yum.repos.d]# vi dvd.repo
[root@localhost yum.repos.d]# yum repolist
Loading "installonlyn" plugin
repo id              repo name                                 status
Fedora-dvd           Fedora 7 DVD                              enabled
[root@localhost yum.repos.d]# yum repolist
Loading "installonlyn" plugin
repo id              repo name                                 status
Fedora-dvd           Fedora 7 DVD                              enabled
[root@localhost yum.repos.d]# vi Dedora 7 DVD
3 files to edit
[root@localhost yum.repos.d]# yum clean all
Loading "installonlyn" plugin
Cleaning up Everything
[root@localhost yum.repos.d]# yum update
Loading "installonlyn" plugin
Setting up Update Process
file:///Fedora%5C7%5Ci386%5CDVD/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/Fedora\\7\\i386\\DVD/repodata/repomd.xml'
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: Fedora-dvd
[root@localhost yum.repos.d]#
I think I am just away from my solution.
kinds regards
garden
 
Old 07-07-2011, 06:16 AM   #15
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Code:
file:///Fedora%5C7%5Ci386%5CDVD/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/Fedora\\7\\i386\\DVD/repodata/repomd.xml'
These %5C symbols are the hex codes for the backslash character. Please, remove the backslash characters from the baseurl... you don't need them! Then create a link to the mount point of your installation DVD without spaces and put the link path in the baseurl, as shown in my previous post.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
add/remove software problem on Fedora 9 - workaround for no internet connection? manorina Linux - Newbie 9 08-04-2009 09:23 PM
Problem with Add Remove Software in fedora 10? nasr-noor Linux - Software 1 05-18-2009 02:00 AM
CentOS 5 Add-Remove Software is not Opening mukundmurari Linux - Software 1 10-21-2007 03:04 AM
add/remove software problem-already process running Carunkumar Fedora 15 03-13-2007 11:53 PM
add/remove software problem in fedora art.love Linux - Software 6 05-12-2006 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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