yum local install to install a package with its dependency

49,629

Inside the local directory where you have all the downloaded RPMs, do this:

 sudo yum --disablerepo=* localinstall *.rpm

OR

 sudo yum --disablerepo=* localinstall foo.rpm bar.rpm baz.rpm

Since you have downloaded all the dependencies to a single directory, you can also use rpm to install those:

 sudo rpm -Uvvh *.rpm --test

--test does a dry-run. Remove it to install on disk.

Share:
49,629
Hare Ram
Author by

Hare Ram

I have around 8 years of experience in software development and providing services for the application that build in Ruby on Rails technology. I hold a Bachelor’s degree in Information Technology (West Bengal University of Technology). My works included an end-to-end solution for software, i.e. From the estimation of the task to the deployment of software. Skills: Ruby, Ruby on Rails, Rspec, TDD, Mysql, Postgresql, IBM DB2, Heroku, Rackspace, Softlayer, s3, Cloud Front, Jquery, Javascript, CSS, HTML.

Updated on September 14, 2021

Comments

  • Hare Ram
    Hare Ram almost 3 years

    I have downloaded a package with it's dependency and want to install a package with dependency. Even though i have download in local folder it's checking for online.

    sudo yum -y --disablerepo=* localinstall autoconf-2.69-11.el7.noarch.rpm

    I am trying above command but failed to load it's dependency that is there in same folder.

    Thanks, Hare