LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Add/Remove software problem in CentOS 5. (https://www.linuxquestions.org/questions/linux-newbie-8/add-remove-software-problem-in-centos-5-a-889340/)

gardenair 07-01-2011 03:20 AM

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

csravi88 07-01-2011 04:23 AM

you might not connected to internet.

have you configured your yum to use local repository?

gardenair 07-01-2011 05:32 AM

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

DavidMcCann 07-01-2011 11:29 AM

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).

gardenair 07-03-2011 10:57 PM

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]
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

DavidMcCann 07-04-2011 10:52 AM

You got the address wrong. The backslashes are placed before the spaces: they are not supposed to replace them.

chrism01 07-04-2011 06:55 PM

FYI, F7 hasn't been updated in yrs; try F14.

gardenair 07-04-2011 11:29 PM

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

MTK358 07-05-2011 07:14 AM

Quote:

Originally Posted by gardenair (Post 4405155)
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.

gardenair 07-06-2011 01:15 AM

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]
name=dvd
baseurl=file://media/Fedora\7\i386\DVD
enabled=1
gpgcheck=0


MTK358 07-06-2011 05:23 AM

Quote:

Originally Posted by gardenair (Post 4406441)
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


:banghead:

But backslashes BEFORE the spaces, don't replace spaces with backslashes! Is it really that hard to understand?!?

gardenair 07-07-2011 04:27 AM

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

colucix 07-07-2011 04:51 AM

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

gardenair 07-07-2011 05:14 AM

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

colucix 07-07-2011 06:16 AM

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.


All times are GMT -5. The time now is 10:39 PM.