apt-get을 사용하여 일부 패키지를 설치하려고 하는데 일종의 종속성 루프에 걸린 것 같습니다.
비슷한 질문/답변을 읽었지만 제공된 솔루션 중 어느 것도 효과가 없었습니다.
다음은 출력 및 오류 메시지입니다 apt-get install -f
. 파이썬 문제인 것 같나요? 어떤 제안이 있으십니까?
매우 감사합니다.
sudo apt-get install -f
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:
cdbs freepats gir1.2-gtksource-3.0 gir1.2-gucharmap-2.90 glib-networking-common gnustep-common gsettings-desktop-schemas gstreamer0.10-plugins-bad gstreamer0.10-x
html2text libaa1 libao-common libao4 libass4 libaudio2 libavc1394-0 libblas-dev libbz2-dev libcaca0 libcdaudio1 libdc1394-22 libdca0 libdirectfb-1.2-9 libdv4 libdvdnav4
libdvdread4 libenca0 libfaad2 libflite1 libgail-3-0 libgeoclue0 libgme0 libgraphite3 libgstreamer-plugins-bad0.10-0 libgucharmap-2-90-7 libiec61883-0 libjpeg8-dev
libkate1 libkpathsea6 liblapack-dev liblcms1 libmhash2 libmimic0 libmms0 libmodplug1 libmpcdec6 libnotify4 libobjc4 libofa0 libopenal-data libopenal1 libopus0
libpoppler19 libptexenc1 libraptor2-0 librasqal3 libraw1394-11 librdf0 libreadline-dev libshout3 libslv2-9 libsoundtouch0 libspandsp2 libtag1-vanilla libtag1c2a
libts-0.0-0 libvo-aacenc0 libvo-amrwbenc0 libwavpack1 libwebkitgtk-3.0-common libwildmidi-config libwildmidi1 libxfont1 libyajl2 libyaml-tiny-perl libzbar0 libzvbi-common
libzvbi0 lmodern luatex notification-daemon tex-common tex-gyre texlive-common texlive-doc-base texlive-fonts-recommended-doc texlive-latex-base-doc
texlive-latex-recommended-doc texlive-pstricks-doc tsconf ttf-dejavu ttf-freefont ttf-marvosym xfonts-encodings xfonts-utils yelp-xsl zenity-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
aspell build-essential dictionaries-common dpkg-dev gir1.2-freedesktop gir1.2-glib-2.0 gobject-introspection ienglish-common ispell libalgorithm-diff-xs-perl
libapt-pkg-perl libaspell15 libaugeas0 libauthen-pam-perl libbit-vector-perl libbsd-resource-perl libcairo-perl libclass-c3-xs-perl libclass-methodmaker-perl
libclone-perl libconfig-augeas-perl libconvert-binary-c-perl libcrypt-ssleay-perl libcurses-perl libdata-alias-perl libdate-calc-xs-perl libdbd-mysql-perl libdbd-pg-perl
libdbd-sqlite3-perl libdbi-perl libdpkg-perl libelfg0 libfcgi-perl libfile-fcntllock-perl libfuse-perl libgd-perl libgirepository-1.0-1 libgirepository1.0-dev
libglib-perl libglib2.0-0 libglib2.0-bin libglib2.0-dev libio-pty-perl liblocale-gettext-perl libtext-iconv-perl patch perl-base python python-gi python-gi-cairo
Suggested packages:
aspell-doc spellutils debian-keyring spell augeas-tools libfont-freetype-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libunix-mknod-perl liblchown-perl
libfilesys-statvfs-perl libgirepository1.0-doc diffutils-doc python-doc python-tk
Recommended packages:
iamerican iamerican-small iamerican-large iamerican-huge iamerican-insane ibritish ibritish-small ibritish-large ibritish-huge ibritish-insane xdg-user-dirs
The following packages will be REMOVED:
libgd-gd2-perl
The following NEW packages will be installed:
aspell build-essential dictionaries-common dpkg-dev ienglish-common ispell libdpkg-perl libelfg0 libgd-perl libio-pty-perl libtext-iconv-perl
The following packages will be upgraded:
gir1.2-freedesktop gir1.2-glib-2.0 gobject-introspection libalgorithm-diff-xs-perl libapt-pkg-perl libaspell15 libaugeas0 libauthen-pam-perl libbit-vector-perl
libbsd-resource-perl libcairo-perl libclass-c3-xs-perl libclass-methodmaker-perl libclone-perl libconfig-augeas-perl libconvert-binary-c-perl libcrypt-ssleay-perl
libcurses-perl libdata-alias-perl libdate-calc-xs-perl libdbd-mysql-perl libdbd-pg-perl libdbd-sqlite3-perl libdbi-perl libfcgi-perl libfile-fcntllock-perl libfuse-perl
libgirepository-1.0-1 libgirepository1.0-dev libglib-perl libglib2.0-0 libglib2.0-bin libglib2.0-dev liblocale-gettext-perl patch perl-base python python-gi
python-gi-cairo
39 upgraded, 11 newly installed, 1 to remove and 1067 not upgraded.
14 not fully installed or removed.
Need to get 0 B/17.7 MB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Reading changelogs... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
dict-common::dc_set: dictionaries-common/default-ispell is already set to
[american (American English)]. Preserving it.
dict-common::dc_set: dictionaries-common/default-wordlist is already set to
[american (American English)]. Preserving it.
Setting up python-minimal (2.7.9-1) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing package python-minimal (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
편집: 제안한 대로 apt-get을 사용하여 python-minimal을 다시 설치하려고 시도했지만 다음 오류가 발생했습니다.
sudo apt-get install --reinstall python2.7-minimal
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:
libalgorithm-diff-xs-perl : Depends: perlapi-5.14.2
libapt-pkg-perl : Depends: perlapi-5.14.2
libbit-vector-perl : Depends: perlapi-5.14.2
libbsd-resource-perl : Depends: perlapi-5.14.2
libcairo-perl : Depends: perlapi-5.14.2
libclass-c3-xs-perl : Depends: perlapi-5.14.2
libclass-methodmaker-perl : Depends: perlapi-5.14.2
libclone-perl : Depends: perlapi-5.14.2
libconfig-augeas-perl : Depends: perlapi-5.14.2
libconvert-binary-c-perl : Depends: perlapi-5.14.2
libcrypt-ssleay-perl : Depends: perlapi-5.14.2
libcurses-perl : Depends: perlapi-5.14.2
libdata-alias-perl : Depends: perlapi-5.14.2
libdate-calc-xs-perl : Depends: perlapi-5.14.2
libdbd-mysql-perl : Depends: perlapi-5.14.2
libdbd-pg-perl : Depends: perlapi-5.14.2
libdbd-sqlite3-perl : Depends: perlapi-5.14.2
libdbi-perl : Depends: perlapi-5.14.2
libfcgi-perl : Depends: perlapi-5.14.2
libfile-fcntllock-perl : Depends: perlapi-5.14.2
libfuse-perl : Depends: perlapi-5.14.2
libgd-gd2-perl : Depends: perlapi-5.14.2
libglib-perl : Depends: perlapi-5.14.2
liblocale-gettext-perl : PreDepends: perlapi-5.14.2
python : Depends: python-minimal (= 2.7.3-4+deb7u1) but 2.7.9-1 is to be installed
python-dev : Depends: python (= 2.7.9-1) but 2.7.3-4+deb7u1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
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:
aspell-en : Depends: aspell (>= 0.60.3-2) but it is not installed
Depends: dictionaries-common (>= 0.49.2) but it is not installed
iamerican : Depends: dictionaries-common but it is not installed
Depends: ienglish-common (= 3.3.02-6) but it is not installed
Depends: ispell but it is not installed
ibritish : Depends: dictionaries-common but it is not installed
Depends: ienglish-common (= 3.3.02-6) but it is not installed
Depends: ispell but it is not installed
libalgorithm-diff-xs-perl : Depends: perlapi-5.14.2
libapt-pkg-perl : Depends: perlapi-5.14.2
libbit-vector-perl : Depends: perlapi-5.14.2
libbsd-resource-perl : Depends: perlapi-5.14.2
libcairo-perl : Depends: perlapi-5.14.2
libclass-c3-xs-perl : Depends: perlapi-5.14.2
libclass-methodmaker-perl : Depends: perlapi-5.14.2
libclone-perl : Depends: perlapi-5.14.2
libconfig-augeas-perl : Depends: perlapi-5.14.2
libconvert-binary-c-perl : Depends: perlapi-5.14.2
libcrypt-ssleay-perl : Depends: perlapi-5.14.2
libcurses-perl : Depends: perlapi-5.14.2
libdata-alias-perl : Depends: perlapi-5.14.2
libdate-calc-xs-perl : Depends: perlapi-5.14.2
libdbd-mysql-perl : Depends: perlapi-5.14.2
libdbd-pg-perl : Depends: perlapi-5.14.2
libdbd-sqlite3-perl : Depends: perlapi-5.14.2
libdbi-perl : Depends: perlapi-5.14.2
libfcgi-perl : Depends: perlapi-5.14.2
libfile-fcntllock-perl : Depends: perlapi-5.14.2
libfuse-perl : Depends: perlapi-5.14.2
libgd-gd2-perl : Depends: perlapi-5.14.2
libglib-perl : Depends: perlapi-5.14.2
liblocale-gettext-perl : PreDepends: perlapi-5.14.2
python : Depends: python-minimal (= 2.7.3-4+deb7u1) but 2.7.9-1 is installed
python-dev : Depends: python (= 2.7.9-1) but 2.7.3-4+deb7u1 is installed
E: Unmet dependencies. Try using -f.
답변1
마지막 줄은 sources.list
Jesse를 가리킵니다.
Wheezy는 Debian의 마지막 안정 버전이고 Jessie는 현재 버전입니다. 그리고 Wheezy는 현재 매우 적은 업데이트만을 받고 있습니다.
방금 실행하면 apt-get install <package>
찾을 수 있는 최신 버전을 설치하려고 시도합니다(고정된 설정을 지정하지 않는 한, 그렇게 하는 경우 이에 대해 알아야 하며 apt 작동 방식을 충분히 이해해야 합니다. 예, 그렇지 않다고 가정하는 것이 안전하다고 생각합니다. 거의 항상 Jessie에서 제공되지만 Wheezy에 Jessie 패키지를 설치하면 문제가 발생할 수 있습니다.
마지막 줄을 제외한 모든 항목은 아일랜드 미러를 가리키고 마지막 줄은 미국을 가리키므로, 이는 자신이 무엇을 하고 있는지 전혀 모르고 해당 항목을 추가했을 수 있음을 의미합니까? 주의 깊게 데비안 시스템 유지 관리에 대한 몇 가지 단어를 읽어 보십시오.
시스템에 이미 Jessie 패키지가 있을 수 있으므로 유일한 합리적인 접근 방식은 Jessie로 업그레이드하는 것입니다. 온라인에는 많은 가이드가 있지만 간단히 말해서 다음과 같습니다.
- 다음 중 어느 곳
wheezy
으로든 변경하세요 .jessie
/etc/apt/sources.list
- 달리기
apt-get update
- 달리기
apt-get dist-upgrade
편집할 때 sources.list
마지막 줄을 삭제하면 됩니다 .
답변2
로컬 버전의 Python을 설치했기 때문에 문제가 발생한 것 같습니다. 로컬 Python 설치를 제거하고 dpkg를 사용하여 python-minimal을 "수동으로" 설치한 후 apt-get -f를 실행할 수 있었습니다. 귀하의 의견에 감사드립니다.