사용자 정의 Debian 패키지는 Debian 제어 파일에 다음과 같은 종속성을 갖습니다.
Depends: docker-ce (=17.03.2~ce-0~debian-stretch)
download.docker.com
공식 데비안 저장소의 일부가 아니기 때문에 여기에서 다운로드해야 합니다 . 적절한 소스 목록은 다음과 같습니다.
# cat /etc/apt/sources.list /etc/apt/sources.list.d/*
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main
deb https://download.docker.com/linux/debian stretch stable
사용자 정의 Debian 패키지 설치에 실패했습니다.
# dpkg --install --force-depends foo.deb
Selecting previously unselected package foo.
(Reading database ... 15743 files and directories currently installed.)
Preparing to unpack foo.deb ...
Unpacking foo (0.0.0-1) ...
dpkg: foo: dependency problems, but configuring anyway as you requested:
foo depends on docker-ce (= 17.03.2~ce-0~debian-stretch); however:
Package docker-ce is not installed.
Setting up foo (0.0.0-1) ...
# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
foo
0 upgraded, 0 newly installed, 1 to remove and 18 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
타사 저장소에서 누락된 패키지를 설치할 것이라고 생각했는데 apt --fix-broken
대신 내 패키지를 제거하려고 합니다. 다음은 작동합니다:docker-ce
foo
# apt-get install docker-ce=17.03.2~ce-0~debian-stretch
# dpkg --install foo.deb
내가 지금까지 시도한 것 :
# apt-get -o Debug::pkgProblemResolver=true install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) foo:amd64 < 0.0.0-1 @iU mK Nb Ib >
Broken foo:amd64 Depends on docker-ce:amd64 < none | 5:18.09.2~3-0~debian-stretch @un uH > (= 17.03.2~ce-0~debian-stretch)
Considering docker-ce:amd64 0 as a solution to foo:amd64 2
Removing foo:amd64 rather than change docker-ce:amd64
# apt install --assume-yes $PWD/foo.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'foo' instead of '/src/foo.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
foo : Depends: docker-ce (= 17.03.2~ce-0~debian-stretch) but 5:18.09.2~3-0~debian-stretch is to be installed
E: Unable to correct problems, you have held broken packages.
# apt-cache policy docker-ce
docker-ce:
Installed: (none)
Candidate: 5:18.09.2~3-0~debian-stretch
Version table:
5:18.09.2~3-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
5:18.09.1~3-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
5:18.09.0~3-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.3~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.2~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.1~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.0~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.03.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.03.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.12.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.12.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.09.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.09.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.06.2~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.06.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.06.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.3~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.2~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.1~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.0~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
답변1
.deb
구성된 리포지토리에서 종속성을 다운로드하는 동안 패키지를 설치하려면 다음을 사용하십시오.
# apt install ./foo.deb
파일이 현재 디렉터리에 있더라도 경로를 제공하십시오.
여전히 종속성을 찾을 수 없으면 출력을 보여주세요 apt-cache policy docker-ce
.
답변2
이것은 에 잘 설명되어 있습니다.이 링크.
나는 3가지 다른 방법을 알고 있습니다.
ㅏ)sudo apt install application.deb
단일 실행으로 종속성이 있는 패키지를 자동으로 설치합니다.
비)
dpkg -i packagename.deb
종속성이 존재하는 경우 packagename.deb
다음 명령을 호출하여 종속성을 해결해야 합니다.
sudo apt install -f
씨)sudo gdebi my_package_1.0.deb
아직 설치되지 않은 경우 gdebi
먼저 설치할 수 있습니다. 특정 패키지(예: 예)가 설치되어 있는지 확인하려면 gdebi
패키지 상태를 확인하고 다음 명령을 실행하면 됩니다.
dpkg -s packagename