이미 설치된 명령에 대한 RPM 패키지 다운로드

이미 설치된 명령에 대한 RPM 패키지 다운로드

다음을 사용하여 openssl-devel을 이미 설치한 CentOS 시스템이 있습니다.

$ yum install openssl-devel 

모든 종속성 패키지를 다운로드하여 설치했습니다. 이제 모든 RPM 패키지가 필요합니다. RPM 패키지만 다운로드할 수 있나요? 내가 이것을 할 때:

 $ yum install  openssl-devel -y --downloadonly 

그것은 말한다

Package 1:openssl-devel-1.0.1e-4.fc18.x86_64 already installed and latest version

이미 설치되어 있으니까요.

동일한 시스템에서 해당 RPM 패키지를 다운로드하는 방법을 아는 사람이 있습니까?

답변1

스위치를 사용하여 이미 설치된 RPM 패키지를 다운로드할 수 있습니다 --downloadonly. 패키지가 이미 설치되어 있는지 확인하기 전에 yum이 이 설정을 확인하지 않는 이유는 확실하지 않지만 도구의 기본 아키텍처로 인해 발생할 수 있다고 생각합니다.

어쨌든, 당신이 해야 할 일은 yum에게 명령하기만 하면 됩니다.다시 설치하다패키지:

yum --downloadonly --downloaddir=/tmp/rpm_files/ reinstall package_name

물론 yum은 이 패키지에만 어떤 종속성이 설치되었는지 알 수 없으므로 RPM을 가져와 다른 시스템에 설치하려고 하면 일부 종속성이 누락될 수 있습니다. 전체 종속성 그래프를 탐색하는 방법이 있으며 이것이 SE의 다른 곳에서 이미 설명되었다고 확신합니다.

답변2

yumdownloaderin은 yum-utils전달된 모든 패키지를 다운로드하거나 선택적으로 패키지를 다운로드할 수 있는 URL을 생성합니다.

답변3

당신은 사용할 수 있습니다다시 추적하다yum-utils 패키지의 명령입니다. 전체 종속성 트리를 다운로드합니다.이미 설치되어 있어도.

예:

sudo yum install yum-utils      # Install yum-utils
sudo repotrack openssl-devel    # Download all dependencies for openssl-devel


샘플 출력:

[sbadra@rhel6 ~]$ sudo yum install openssl-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Setting up Install Process
Package openssl-devel-1.0.1e-57.el6.x86_64 already installed and latest version
Nothing to do

[sbadra@rhel6 ~]$ sudo repotrack openssl-devel
Downloading audit-libs-2.4.5-6.el6.x86_64.rpm
Downloading audit-libs-2.4.5-6.el6.i686.rpm
Downloading basesystem-10.0-4.el6.noarch.rpm
Downloading bash-4.1.2-48.el6.x86_64.rpm
Downloading ca-certificates-2017.2.14-65.0.1.el6_9.noarch.rpm
Downloading chkconfig-1.3.49.5-1.el6.x86_64.rpm
Downloading coreutils-8.4-46.el6.x86_64.rpm
Downloading coreutils-libs-8.4-46.el6.x86_64.rpm
.... more packages ....
Downloading openssl-1.0.1e-57.el6.i686.rpm
Downloading openssl-1.0.1e-57.el6.x86_64.rpm
Downloading openssl-devel-1.0.1e-57.el6.i686.rpm
Downloading openssl-devel-1.0.1e-57.el6.x86_64.rpm
.... more packages ....
Downloading sed-4.2.1-10.el6.x86_64.rpm
Downloading setup-2.8.14-23.el6.noarch.rpm
Downloading tzdata-2018c-1.el6.noarch.rpm
Downloading zlib-1.2.3-29.el6.x86_64.rpm
Downloading zlib-1.2.3-29.el6.i686.rpm
Downloading zlib-devel-1.2.3-29.el6.i686.rpm
Downloading zlib-devel-1.2.3-29.el6.x86_64.rpm

답변4

내가하는 일은 다음과 같습니다.

sudo yum install --config=./yum.conf 
  --installroot=/tmp/f541Sdex 
  --downloadonly 
  --downloaddir /tmp/DL-e25xds 
  $(cat list-of-packages)

관련 정보