LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-29-2008, 01:17 AM   #1
invent
LQ Newbie
 
Registered: Nov 2007
Posts: 12

Rep: Reputation: 0
Yum has been problem.


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.


Please,help me . What's incorrect?
 
Old 01-29-2008, 05:55 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Have you created the local mirror using createrepo???

http://dag.wieers.com/rpm/packages/createrepo/
createrepo-0.4.8-1.el5.rf.noarch.rpm

From the /rpm directory after installing createrepo type; createrepo /rpm

Try again when done.
 
Old 01-29-2008, 07:46 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
The error is quite accurate of the issue:

<urlopen error unknown url type: media>

You can't use file:// as the url in your repo configurations. I believe the only supported url types are http, ftp and rsync for yum repositories.
 
Old 01-29-2008, 09:57 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
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
 
Old 01-29-2008, 10:34 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Lenard View Post
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.

Last edited by trickykid; 01-29-2008 at 10:36 AM.
 
Old 01-29-2008, 10:57 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
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;

http://wiki.centos.org/HowTos/CreateLocalRepos
 
Old 01-30-2008, 03:12 AM   #7
invent
LQ Newbie
 
Registered: Nov 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Unhappy

Dear All,

Thank you for your suggest.
The Cause of problem:
I used to createrepo command and then I try to clean repo by "yum clean all" command.

Now, I use "createrepo" command again and try to install by yum.
Result is same.It still can not install rpm package by yum command.

*Note In the rpm directory , I copied all package into all Redhat CD to rpm directory.
 
0 members found this post helpful.
Old 01-30-2008, 04:55 AM   #8
akhil.mud
LQ Newbie
 
Registered: Sep 2007
Posts: 17

Rep: Reputation: 0
[local]
name=local repository
baseurl=file:///rpm/
enabled=1
gpgcheck=0

THIS IS YOUR CONFIGURATION file.just change name
[local] to [LOCAL] it will solve your problem
 
Old 01-30-2008, 05:11 AM   #9
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Hmmm......... mine looks like very much like yours;

Code:
[local-media]
name=Red Hat-$releasever - Media
baseurl=file:///RHEL5
gpgcheck=0
enabled=0
If I want something from this local repo installed:
yum install foo --disablerepo=\* --enablerepo=local-media
 
Old 01-30-2008, 05:32 AM   #10
bbfuller
Member
 
Registered: Dec 2007
Location: UK
Distribution: Mageia, MX, Manjaro, OpenSuSE, PCLinuxOS
Posts: 214

Rep: Reputation: 35
Is it something to do with the final / in the OP's config line?

baseurl=file:///rpm/

In my setup, when I have the repomod files in the folder along with the rpm's this works:

baseurl=file:///mnt/fedora8_386_updates
 
Old 01-30-2008, 07:41 AM   #11
invent
LQ Newbie
 
Registered: Nov 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Hello akhil.mud ,

I try to change name [local] to [LOCAL].
I can solved this problem .
Thank you very much.
 
Old 08-11-2009, 11:39 AM   #12
mangatmodi
Member
 
Registered: Aug 2009
Location: India
Distribution: Fedora 12
Posts: 35

Rep: Reputation: 0
Possible Right solution to the problem

Quote:
Originally Posted by invent View Post
Hello akhil.mud ,

I try to change name [local] to [LOCAL].
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
 
Old 10-23-2009, 02:07 PM   #13
wormey
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by mangatmodi View Post
Changing [local] to [LOCAL] won't solve this problem.
It sure enough did for me.
 
  


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
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 02:34 AM
Problem using Yum DirkDiggler Linux - Software 15 05-18-2007 03:34 PM
Yum Problem - /var/cache/yum/base/primary.xml.gz:1 ice99 Linux - Software 0 12-15-2005 01:08 PM
Problem with yum grovesj2 Linux - Newbie 1 08-22-2005 08:39 PM
Problem with yum saravkrish Fedora 5 12-16-2004 10:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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