A question about using YUM

Paul Howarth paul at city-fan.org
Fri Jan 13 11:52:45 UTC 2006


Nguyen Danh Hieu wrote:
> Thanks for your reply. Each time when I try to install some programs ( 
> from source or rpm)  It happended that the package requires another, and 
> then the another requires others package, library... and so on.
> Because of that I want to download every lib,rpm or sources ( that 
> appeares on LAN ) to my harddisk and force yum to find and fetch 
> dependencies from the folders. What you said,as I understand,  that I 
> have to  build my own repository. How to do that?

Decide where you want to put the RPM packages you've copied. Let's say 
it's /home/localrepo

# mkdir /home/localrepo
# cd /home/localrepo
# mkdir RPMS
# cp /path/to/*.rpm RPMS
# createrepo .

(createrepo is a separate package you can install - it's not part of yum 
itself)

That should create a directory /home/localrepo/repodata with the 
information needed by yum.

Next, create a file /etc/yum.repos.d/local.repo containing the following:

[localrepo]
name=Local repository for downloaded packages
baseurl=file:///home/localrepo
enabled=1
gpgcheck=0

You should then be able to pick up packages from your local repository. 
Bear in mind that it will still pull packages from the Net if they are 
"later" than the ones in your local repo.

P.S. Please don't top-post on this mailing list.

Paul.




More information about the fedora-list mailing list