Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When i use yum command then error occur as below:
[root@server1 yum.repos.d]# yum -y install httpd
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for httpd to pack into transaction set.
media://1192656534.547140%232/httpd-2.2.3-11.el5.i386.rpm: [Errno 4] IOError: <urlopen error unknown url type: media>
Trying other mirror.
Error: failed to retrieve httpd-2.2.3-11.el5.i386.rpm from local
error was [Errno 4] IOError: <urlopen error unknown url type: media>
Configuration of repo as below:
[root@server1 yum.repos.d]# cat /etc/yum.repos.d/server1.repo
[local]
name=local repository
baseurl=file:///rpm/
enabled=1
gpgcheck=0
In the "/rpm" , I keep all rpm package in Redhat CD.
I don't know what's happen? I try to use yum command for installation other package but also same as those error.
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
Errr...........Yes one can, here is an example of the CentOS-Media.repo file (part of the installation);
Code:
# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
# CentOS-5. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c5-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=media-c5 [command]
[media-c5]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta
Errr...........Yes one can, here is an example of the CentOS-Media.repo file (part of the installation);
Code:
# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
# CentOS-5. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c5-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=media-c5 [command]
[media-c5]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta
Strange it would output unknown url type then in the error. Definitely not an issue with headers and such then according to the error. Is the redhat cd mounted at or on /rpm? But then again, I find it kind of silly to use yum to install packages locally on a machine. Just cd into the directory and install it with just rpm command. If it complains about dependencies, install those as well.
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
I understand but some don't know any better or another way except to use yum. Using yum with a local yum repo is a good idea (both for the host system and any clients), after all updates do happen and the CD/DVD media rarely gets updated.
Also I forgot to provide this link in my earlier reply;
Changing [local] to [LOCAL] won't solve this problem. It's just the name given that the yum will show. I've given it name as [MY DVD].
Solution to your problem lies in changing baseurl=file:///rpm/ to baseurl=file:///rpm , i.e. drop last / as whatbbfuller said
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.