Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yum local install to install a package with its dependency

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

like image 532
Hare Ram Avatar asked Mar 29 '17 10:03

Hare Ram


People also ask

How do I install a package and all of its dependencies?

If you want to install package along with its dependencies, it is recommended that you use dpkg tool with -f option. In that case, you can simply use -f option to automatically install dependencies of a package. Here is an example to install teamviewer along with its dependencies. That's it.

What is yum local install?

yum localinstall package_name – yum searches the package in the working directory of terminal ( which is your /home by default ) and solves the dependencies and downloads dependencies and install them.

Does yum automatically install dependencies?

RPM can make a sysadmin's life a lot easier by presenting these dependencies – and tools relying on RPM such as the rpm utility, or yum can automatically solve these dependencies, and install all additional packages needed for a new component to run properly.

How do I install my local RPM files using yum?

Use the command yum localinstall /path/to/file. rpm . This command will install the local rpm file as well as searching for required rpms (dependencies, etc) on RHN or other repositories that are configured and install it for the user.

How to download and install all dependencies with Yum install?

You can download package and it's all dependencies with yum install. For example to download all required rpms into packages directory: yum install --downloadonly --downloaddir=packages mysql++-devel After all dependencies has been downloaded, you can copy the packages to the target host and install them with

How do I remove on hold dependencies in Yum?

Clean the package dependencies. Clean cached packages. A “on-hold” or “held” package should be removed. You can execute it using the -f flag as the install command. Use the build-dep command. Does Yum Install Dependencies?

How do I download all the RPMs of a Yum package?

yum install yum-plugin-downloadonly Make a directory where you will download the RPMs. mkdir /nfs Now, we use –downloadonly to download all the RPMs of the package and its dependencies into the /nfs directory. yum install git -y --downloadonly --downloaddir=/nfs

How do I update a Yum package?

Search for available packages. Install the latest version of a package. List the packages installed on your system. Install a specific version of a package. Update a package to the latest version. And you? What package are you installing with yum?


1 Answers

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.

like image 137
iamauser Avatar answered Sep 21 '22 19:09

iamauser