패키지를 업그레이드하거나 설치/제거할 수 없습니다.

패키지를 업그레이드하거나 설치/제거할 수 없습니다.

나는 우분투 14.04를 사용하고 있습니다. 화면에 다음과 같은 빨간색 기호가 나타나는지 모르겠습니다.

영상

이를 사용하여 업그레이드하려고 하면 sudo apt-get upgrade오류가 발생합니다.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 click : Depends: python3-click-package (= 0.4.45.1+16.10.20160916-0~619~ubuntu14.04.1)
E: Unmet dependencies. Try using -f.

Enter 하면 sudo apt-get -f install또 다른 오류가 발생합니다.

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  at bzr bzr-builddeb click-dev click-doc dctrl-tools debian-archive-keyring
  debootstrap devscripts distro-info distro-info-data dput ebtables fcitx-libs
  fcitx-libs-gclient freetds-common gdb-multiarch libaio1
  libboost-filesystem1.54.0 libboost-program-options1.54.0
  libboost-regex1.54.0 libboost-thread1.54.0 libcommon-sense-perl
  libdistro-info-perl libdrm-intel1:i386 libdrm-nouveau2:i386
  libdrm-radeon1:i386 libelf1:i386 libexpat1:i386 libexporter-lite-perl
  libffi6:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386
  libio-stringy-perl libjs-sphinxdoc libjson-perl libjson-xs-perl
  libllvm3.4:i386 liblxc1 libodbc1 libparse-debcontrol-perl libpciaccess0:i386
  libpq5 librados2 librbd1 libstdc++6:i386 libsybdb5 libtie-ixhash-perl
  libtxc-dxtn-s2tc0:i386 libx11-xcb1:i386 libxcb-dri2-0:i386
  libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386
  libxcb-xinerama0 libxdamage1:i386 libxdelta2 libxfixes3:i386
  libxshmfence1:i386 libxxf86vm1:i386 lxc-common lxcfs lxd lxd-client pbuilder
  pbzip2 pristine-tar pybootchartgui python-bzrlib python-configobj
  python-debianbts python-distro-info python-dns python-fpconst python-gpgme
  python-keyring python-launchpadlib python-lazr.restfulclient python-lazr.uri
  python-lzma python-oauth python-reportbug python-secretstorage
  python-simplejson python-soappy python-wadllib qemu-utils quilt reportbug
  schroot schroot-common ubuntu-dev-tools ubuntu-emulator
  ubuntu-emulator-runtime:i386 ubuntu-sdk-tools uidmap xdelta
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  click
Suggested packages:
  ubuntu-app-launch-tools upstart-app-launch-tools
Recommended packages:
  click-apparmor
The following packages will be upgraded:
  click
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
13 not fully installed or removed.
Need to get 0 B/14.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 297452 files and directories currently installed.)
Preparing to unpack .../click_0.4.46+17.10.20170607.3-0~622~ubuntu14.04.1_amd64.deb ...
Failed to issue method call: Unit click-system-hooks.service not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to issue method call: Unit click-system-hooks.service not loaded.
dpkg: error processing archive /var/cache/apt/archives/click_0.4.46+17.10.20170607.3-0~622~ubuntu14.04.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
Failed to issue method call: Unit click-system-hooks.service failed to load: No such file or directory. See system logs and 'systemctl status click-system-hooks.service' for details.
Errors were encountered while processing:
 /var/cache/apt/archives/click_0.4.46+17.10.20170607.3-0~622~ubuntu14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

심지어 설치도 안되네요python3-click-package

$ sudo apt-get  install python3-click-package
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-click-package is already the newest version.
python3-click-package set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 click : Depends: python3-click-package (= 0.4.45.1+16.10.20160916-0~619~ubuntu14.04.1)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Google에서 찾은 각 명령을 설치하려고 시도했지만 아쉽게도 :(

이 오류를 어떻게 해결할 수 있는지 친절하게 안내해주세요.

답변1

설치된 버전과 호환되지 않는 라이브러리가 포함된 패키지를 Ubuntu 14.04에 실수로 설치하려고 했습니다. 문제를 제거하고 Ubuntu 버전에 적합한 패키지를 설치해야 합니다.

귀하의 오류는 귀하의 click패키지 python3-click-package에 최소한0.4.45.1+16.10.20160916-0~619~ubuntu14.04.1. python3-click-package우분투 16.04 버전 은0.4.43+16.04.20170613-0ubuntu1. 그거보다 낮네요0.4.45실패한 click설치에 필요한 것입니다.

그런데 python3-click-package버전이0.4.45.1+16.10.20160916-0~619~ubuntu14.04.1Ubuntu 17.04 저장소의 일부입니다.

다음 단계에 따라 일치하지 않는 라이브러리 문제를 해결할 수 있습니다.

문제를 해결하려면 다음 단계를 수행하세요. 프로세스 중에 경고와 오류가 표시됩니다. 단계를 두 번 이상 반복해야 합니다. 각 루프는 몇 가지 후속 정리를 수행하고 진행 방법에 대한 정보를 제공합니다.

다음으로 시작:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

지침 이 표시되면 autoremove다음을 수행하십시오.

$ sudo apt-get autoremove

이제 재부팅이 필요한지 확인하십시오. 이것을 실행하세요:

$ [[ -f /var/run/reboot-required ]] && echo "Reboot Now"

재부팅이 필요한 경우 계속 진행하기 전에 재부팅하세요.

이제 문제가 있는 응용 프로그램을 수정하십시오.

$ sudo apt remove click --purge
$ sudo apt remove python3-click-package --purge
$ sudo apt autoremove
$ sudo apt install click
$ sudo apt remove python3-click-package
$ sudo apt autoremove

시스템이 자동으로 업데이트 및 업그레이드를 수행하도록 허용하면 정상적인 작업 중에 이러한 수동 명령이 원활하게 수행됩니다. 수동 유지 관리를 수행할 때 일부는 매우 중복되는 것처럼 보입니다. 그것들은 필요합니다.

관련 정보