시도하면 apt-get upgrade
(예, 먼저 업데이트했습니다) 다음과 같은 결과가 나타납니다.
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python-samba : Depends: libwbclient0 (= 2:4.5.12+dfsg-2+deb9u2) but 2:4.5.12+dfsg-2+deb9u3 is installed
Depends: samba-libs (= 2:4.5.12+dfsg-2+deb9u2) but 2:4.5.12+dfsg-2+deb9u3 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
따라서 범인 은 libwbclient0
Subversion에 필요 하지만 deb9u2
분명히 deb9u3
.--fix-broken
apt-get
maketrans
ConfigParser
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
python-samba
Suggested packages:
python-gpgme
The following packages will be upgraded:
python-samba
1 upgraded, 0 newly installed, 0 to remove and 91 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,364 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 567338 files and directories currently installed.)
Preparing to unpack .../python-samba_2%3a4.5.12+dfsg-2+deb9u3_amd64.deb ...
Traceback (most recent call last):
File "/usr/bin/pyclean", line 32, in <module>
from debpython.namespace import add_namespace_files
File "/usr/share/python/debpython/namespace.py", line 28, in <module>
from debpython.pydist import PUBLIC_DIR_RE
File "/usr/share/python/debpython/pydist.py", line 27, in <module>
from string import maketrans
ImportError: cannot import name 'maketrans'
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/pyclean", line 32, in <module>
from debpython.namespace import add_namespace_files
File "/usr/share/python/debpython/namespace.py", line 28, in <module>
from debpython.pydist import PUBLIC_DIR_RE
File "/usr/share/python/debpython/pydist.py", line 27, in <module>
from string import maketrans
ImportError: cannot import name 'maketrans'
dpkg: error processing archive /var/cache/apt/archives/python-samba_2%3a4.5.12+dfsg-2+deb9u3_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/python-samba_2%3a4.5.12+dfsg-2+deb9u3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
저는 Debian Stretch 9.4 커널을 사용하고 있습니다:
Linux 3.10-2-amd64 #1 SMP Debian 3.10.7-1
내 시도가 실패하고 이 문제를 해결하는 정보를 온라인에서 찾을 수 없어서 물어보고 aptitude
시도해 synaptic
보았습니다. 둘 다 뭔가를 시도했지만 실패했습니다.
삼바도 필요하지 않으므로 제거하는 것이 좋을 것입니다. 하지만 apt
손상된 패키지를 고칠 때까지는 아무것도 삭제하고 싶지 않습니다.
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
답변1
ImportError: cannot import name 'maketrans'
maketrans
Python 2 코드에서와 마찬가지로 가져오기를 시도하여 발생하는 Python 3 오류입니다. 이는 /usr/bin/python
시스템에 Python 3 인터프리터가 있음을 의미합니다. 이는 데비안 파생물을 손상시킵니다.
이 문제를 해결하려면 아직 설치되어 있다고 가정하고 다음을 가리키도록 심볼릭 링크를 python2.7
수정해야 합니다 ./usr/bin/python
/usr/bin/python2.7
sudo ln -s python2.7 /usr/bin/python