How to install .rpm file from a directory using yum?

Hello Everybody,

I am having a cluster which is not connected to internet. I want to check its performance do I downloaded required packages from the internet and copied them in a particular folder. As per the instructions given at
http: //manyrootsofallevilrants.blogspot.in/2012/04/hpc-beowulf-style-cluster-using-centos.html

The instructions are as :

Install compilers and libraries (Note that development packages were obtained from http: //isoredirect.centos.org/centos/6/os/x86_64/Packages/ and yum was run from the directory containing them):
yum -y install atlas blas lapack atlas-devel-3.8.4-1.el6.x86_64.rpm

But when I run the above command I get an error message as :

Loaded plugins: fastestmirror, security
loading mirror speeds from cached hostfile
could not retrieve mirrorlist http //mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14 pycurl error 7 couldn't connect to host
error cannot find a valid baseurl for repo: base

Can somebody tell me how to solve this problem and install the packages from directory using yum.

Thanks.

Hi you may install the rpm package via rpm without using yum, once you have downloaded the package.

yum error message seems originated by invalid base url for repository base.

Have a look at /etc/yum.conf for misspelled configuration entries.

see ya
fra

1 Like

Thanks frappa,

But the problem with rpm is it doesn't check for dependencies. Then how to solve this problem of dependencies with rpm?

rpm doesn't have dependencies? Then why does it have an option to disable dependencies, --nodeps ?

Doesn't have dependencies means I want to say it doesn't resolve if it requires any dependency files. It will simply throw an error or if you want to avoid those errors you can use --nodeps to avoid such errors. But in that can it may work or may not depending upon your need.
Instead if we use yum it resolve dependencies and download and install the dependency files automatically.

Hi albertspade,

did you check out for problems in /etc/yum.conf? It seems to be the main issue to resolve before trying anything else (check for proxies; look at the repositories mirrorlist and baseurls listed in the files inside /etc/yum.repos.d and see if you can get at those addresses by manually navigating via a web-browser).

As a last resort, if dependencies are not so hard to resolve you can try to resolve them manually (look at --requires rpm option).

see ya
fra

If you want yum to install rpms from a particular folder, you have to set up a local repository - say localrepo.

From memory, I have not tested this ....

# yum install createrepo
# createrepo /localrepo

Put your rpms in /localrepo and add localrepo entry to /etc/yum.repos.d/

[localrepo]
name=Local Repo
baseurl=file:///localrepo/
enabled=1
gpgcheck=0