How to install a rpm package and its dependencies offline

后端 未结 2 794
庸人自扰
庸人自扰 2021-01-22 17:17

I want to install a rpm package, (e.g. python 3), and all of its dependencies in a linux server that does not have internet connection.

How can I do that?

2条回答
  •  盖世英雄少女心
    2021-01-22 18:20

    Assuming you already downloaded the package before from another machine that has internet access and FTP the files to your server, you can use the following command to install a rpm

    rpm -ivh package_name_x85_64.rpm
    

    options:

    • i = This installs a new package.
    • v = Print verbose information
    • h = Print 50 hash marks as the package archive is unpacked.

    You can also check the rpm manual for more options and details

提交回复
热议问题