LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I install to different directory with yum? (http://www.linuxquestions.org/questions/linux-software-2/how-do-i-install-to-different-directory-with-yum-513779/)

nadavvin 12-26-2006 09:52 AM

How do I install to different directory with yum?
 
I want install very base system to chroot with yum:

Code:

$ sudo yum --installroot=/opt/linux/ install bash
Setting up Install 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
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update
[nadav@pcnadav /tmp]$ sudo yum --installroot=/opt/linux/ install yum
Setting up Install 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
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update

Code:

  --installroot=[path]  set install root
Why isn't it work?

Centos 4.

thanks for your help
Nadav.

Lenard 12-27-2006 10:19 AM

First try replacing your current /etc/yum.repos.d/CentOS-base.repo file with the one found here;

http://isoredirect.centos.org/centos/4.4/

And you might want to upgrade yum;

Code:

rpm -Uvh http://isoredirect.centos.org/centos/4.4/os/i386/CentOS/RPMS/yum-2.4.3-1.c4.noarch.rpm
I will leave any dependency issues for you to resolve.

You may want to review this also; http://linux.web.psi.ch/livecd/build.html

brianko 01-18-2007 03:05 PM

This doesn't fix the problem when using CentOS 4.4. Appears to be something else...

reddazz 01-18-2007 03:09 PM

The updates repo seems to be offline. Try doing
Code:

#yum --disablerepo=update --installroot=/opt/linux/ install bash

brianko 01-18-2007 03:13 PM

Appreciate the quick response! Unfortunately, no luck on this one:

Code:

[root@galena tmp]# yum --disablerepo=updates --installroot=/opt install joe


Error getting repository data for updates, repository not found

Further digging reveals that $releasever isn't getting set.

Running yum without --installroot set seems to work fine.

UPDATE: Well, despite numerous examples of "yum --installroot=yada" in the docs, this doesn't seem to work on a stock CentOS 4.4 install, and I've not found an adequate solution other than to install from source. My suggestion to those with this problem is to not waste time with it if you can install from source -- your time will be much better spent than trying to track this one down. Thanks to reddazz and Lenard for the suggestions!

Lenard 01-19-2007 05:31 AM

Quote:


Further digging reveals that $releasever isn't getting set.

As a suggestion edit the CentOS-Base.repo file, for example;

[update]
name=CentOS-4.4 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/4/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4


All times are GMT -5. The time now is 09:35 AM.