LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-17-2008, 10:15 AM   #1
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Rep: Reputation: 31
How to install a current yum in RHEL ?


Hi

Ive searched google and this forum for possible solutions to install yum. The problem is that when installing yum you have to do it from source or rpm files, i have tried both.

When installing with RPM files
- When installing from RPM files i install a few of the dependencies, but after i have installed couple of dependencies i see that more than one dependency has serveral other dependencies which again has other dependencies, making it an infinite number of dependencies. So this method is not very good.

When installing from source code
- When running "make" i get the following error:
make[1]: Leaving directory `/opt/yum-3.2.20/etc'
make[1]: Entering directory `/opt/yum-3.2.20/docs'
echo "Nothing to do"
Nothing to do
make[1]: Leaving directory `/opt/yum-3.2.20/docs'
make[1]: Entering directory `/opt/yum-3.2.20/po'
intltool-update --gettext-package=yum --pot
make[1]: intltool-update: Command not found
make[1]: *** [yum.pot] Error 127
make[1]: Leaving directory `/opt/yum-3.2.20/po'
make: *** [subdirs] Error 1

..so i think "ok" so all i need to do is to install the "intltool-update" package. I go to rpmfind.net and find the package but i see that this package again has serveral dependencies that again requires other dependencies. I then download the source code instead to this tool, but when running the configure script i am again faced with dependencies that is needed to run the configure script successfully.

Does someone know a good way to install yum on RHEL ? I appericiate all help.
 
Old 12-17-2008, 10:29 AM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
yum should already be installed..

What happens when you do a:

which yum
 
Old 12-17-2008, 12:52 PM   #3
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Yum is not already installed. This is a specific RHEL installation and altering the packages that come with the installation is not an option. "which yum" displays that i cant find anything like yum anywhere in the PATH environment variable. If i do i "nice --19 find / -name *yum -ls" nothing is displayed. Please dont worry about if yum is installed or not, the question is how i can install yum when it isnt installed which is the case here.
 
Old 12-17-2008, 01:28 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by exceed1
This is a specific RHEL installation and altering the packages that come with the installation is not an option.
Which version of RHEL is this? 3 or 4?

If altering the packages is not an option, then I'd advise against installing yum. You'll be trailblazing on some experimental terrain.

I'm going to take a WAG that you're not subscribed to the RHN. If that's the case, why not run CentOS and let the base installation / official repos handle the headache for you?
 
Old 12-17-2008, 01:30 PM   #5
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Quote:
Please dont worry about if yum is installed or not, the question is how i can install yum when it isnt installed which is the case here.


Dont worry.. with that kind of attitude I wont be worried about any of your threads from now on.
 
Old 12-17-2008, 01:47 PM   #6
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by anomie View Post
Which version of RHEL is this? 3 or 4?

If altering the packages is not an option, then I'd advise against installing yum. You'll be trailblazing on some experimental terrain.

I'm going to take a WAG that you're not subscribed to the RHN. If that's the case, why not run CentOS and let the base installation / official repos handle the headache for you?
Yes, im subscribed to RHN. Its RHEL 4.

I was able to install yum now with the packages from CentOS 4.6 64-bit (grabbed RPMs manually from the repo). But even when using valid and current repositories i get this message:
"# yum update
Setting up Update Process
Setting up repositories
not using ftp, http[s], or file for repos, skipping - Null is not a valid release or hasnt been released yet
http://mirror.centos.org/centos/Null...ta/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try."

It doesnt seem like its able to use any of the mirrors.

Here is the yum.conf:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3
enabled=1
priority=1
protect=1

#released updates
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3
enabled=1
priority=1
protect=1

Any ideas why yum is not able to use any of these repos ? When looking at the output from yum it seems like it doesnt get any value for the $releasever version, but i cant imagine why i doesnt get any value.

Last edited by exceed1; 12-17-2008 at 01:53 PM.
 
Old 12-17-2008, 01:49 PM   #7
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by ncsuapex View Post
Dont worry.. with that kind of attitude I wont be worried about any of your threads from now on.
Sorry man, i wasnt trying to be rude or anything.
 
Old 12-17-2008, 02:00 PM   #8
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Ok, i now changed the $releasever variable with the 4.6 number eventhough it seems like its recommended to use this variable.

I then got the following output when running "yum update":
Code:
yum update
Setting up Update Process
Setting up repositories
Reading repository metadata in from local files
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 97, in main
    result, resultmsgs = do()
  File "/usr/share/yum-cli/cli.py", line 477, in doCommands
    return self.updatePkgs()
  File "/usr/share/yum-cli/cli.py", line 955, in updatePkgs
    self.doRepoSetup()
  File "/usr/share/yum-cli/cli.py", line 75, in doRepoSetup
    self.doSackSetup(thisrepo=thisrepo)
  File "__init__.py", line 260, in doSackSetup
  File "repos.py", line 277, in populateSack
  File "sqlitecache.py", line 96, in getPrimary
  File "sqlitecache.py", line 83, in _getbase
  File "sqlitecache.py", line 77, in getDatabase
AttributeError: 'module' object has no attribute 'DatabaseError'
Could someone please explain why i getting these message and/or how i can get yum to work correctly ?
 
Old 12-17-2008, 02:05 PM   #9
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by exceed1
Yes, im subscribed to RHN. Its RHEL 4
....
Any ideas why yum is not able to use any of these repos ? When looking at the output from yum it seems like it doesnt get any value for the $releasever version, but i cant imagine why i doesnt get any value.
Just a quick anecdote and some advice from me: Our department has standardized on RHEL4 (for application servers and database servers), and it took me a little while to get used to up2date. It's definitely not as nice as yum.

However, with this simple comparison / guide, you can easily accomplish the package management tasks you need to:

http://kbase.redhat.com/faq/docs/DOC-2531

My advice is that you stick with up2date. It's part of the standard RHEL4 installation, and it's supported.

I am not trying to distract from your thread (and maybe someone else will chime in with a bright idea to solve your problem), but IMO you're heading down a path that is going to cause a lot of headaches in the future.
 
Old 12-17-2008, 02:13 PM   #10
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Thanks you anomie for your answer. I didnt know that i could use up2date for the same task, then i will use that instead and remove everything related to yum. Also, great reference.

Last edited by exceed1; 12-17-2008 at 02:15 PM.
 
Old 12-17-2008, 02:57 PM   #11
robertwolfe
Member
 
Registered: Apr 2005
Location: Grand Island, NY
Distribution: Ubuntu and Debian
Posts: 57

Rep: Reputation: 16
Quote:
Originally Posted by exceed1 View Post
Thanks you anomie for your answer. I didnt know that i could use up2date for the same task, then i will use that instead and remove everything related to yum. Also, great reference.
Just be advised that up2date has been deprecated in RHEL5 IIRC.
 
Old 12-17-2008, 03:02 PM   #12
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
On RHEL5, yum is the standard:

http://www.redhat.com/docs/manuals/e...ES-x86-en.html

Quote:
up2date and yum

up2date is being deprecated in favor of yum (Yellowdog Updater Modified)...
So it makes sense to use yum on RHEL5 (not RHEL4).
 
Old 12-17-2008, 05:01 PM   #13
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Okey, thanks for nice information robertwolfe and anomie.. appriciated
 
  


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
YUM Install - RHEL 5 aferraccioli Linux - Newbie 3 03-19-2009 02:44 PM
How current are rpm and yum repositories LaoTzu Linux - Software 4 11-19-2008 08:49 PM
Unable to configure yum trying to upgrade rhel as 3 to current day std mahaila Linux - Newbie 6 11-12-2008 11:00 PM
Current best RHEL cert course, self study? tmoble Red Hat 1 08-02-2007 03:53 AM
How can I install yum and depencies on RHEL 4 ps_sabu Red Hat 2 12-01-2006 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:18 PM.

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