Add/Remove software problem in CentOS 5.
1 Attachment(s)
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 |
you might not connected to internet.
have you configured your yum to use local repository? |
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 |
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). |
1 Attachment(s)
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] I have also create /etc/yum.repos.d/dvd.repo file and Code:
[dvd] 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 |
You got the address wrong. The backslashes are placed before the spaces: they are not supposed to replace them.
|
FYI, F7 hasn't been updated in yrs; try F14.
|
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] garden |
Quote:
Basically, putting a backslash in front of any special character in bash will make it a literal character. |
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 :hattip: if do write the procedure.As i understand I write please make necessary correction so I may implement on the system Code:
[dvd] |
Quote:
But backslashes BEFORE the spaces, don't replace spaces with backslashes! Is it really that hard to understand?!? |
Well thanks
Code:
[Fedora-DVD] Code:
# yum clean all |
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 Code:
baseurl=file:///media/Fedora7 |
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] Code:
[root@localhost yum.repos.d]# vi dvd.repo kinds regards garden |
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' |
All times are GMT -5. The time now is 10:39 PM. |