%20%E3%82%92%E8%A7%A3%E6%B1%BA%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F.png)
python3-setuptoolsをインストールしようとしていたのですが、
$ sudo apt-get install python3-setuptools
次のエラーが発生します:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-setuptools (0.6.34-0ubuntu1) ...
Traceback (most recent call last):
File "/usr/bin/py3compile", line 36, in <module>
from debpython import files as dpf
File "/usr/share/python3/debpython/files.py", line 25, in <module>
from debpython.pydist import PUBLIC_DIR_RE
File "/usr/share/python3/debpython/pydist.py", line 28, in <module>
from debpython.tools import memoize
File "/usr/share/python3/debpython/tools.py", line 25, in <module>
from datetime import datetime
ImportError: /usr/bin/datetime.so: undefined symbol: _Py_ZeroStruct
dpkg: error processing python3-setuptools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python3-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get clean
、、、、、、およびapt-get autoclean
を試しましたが、どれも機能しませんでした。apt-get remove python3-setuptools
dpkg --remove python3-setuptools
apt-get install -f
dpkg -P --force-remove-reinstreq
dpkg -P --force-all --force-remove-reinstreq
dpkg --purge
出力sudo dpkg -P --force-all --force-remove-reinstreq python3-setuptools
(Reading database ... 225309 files and directories currently installed.)
Removing python3-setuptools ...
Traceback (most recent call last):
File "/usr/bin/py3clean", line 32, in <module>
from debpython import files as dpf
File "/usr/share/python3/debpython/files.py", line 25, in <module>
from debpython.pydist import PUBLIC_DIR_RE
File "/usr/share/python3/debpython/pydist.py", line 28, in <module>
from debpython.tools import memoize
File "/usr/share/python3/debpython/tools.py", line 25, in <module>
from datetime import datetime
ImportError: /usr/bin/datetime.so: undefined symbol: _Py_ZeroStruct
dpkg: error processing python3-setuptools (--purge):
subprocess installed pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/py3compile", line 36, in <module>
from debpython import files as dpf
File "/usr/share/python3/debpython/files.py", line 25, in <module>
from debpython.pydist import PUBLIC_DIR_RE
File "/usr/share/python3/debpython/pydist.py", line 28, in <module>
from debpython.tools import memoize
File "/usr/share/python3/debpython/tools.py", line 25, in <module>
from datetime import datetime
ImportError: /usr/bin/datetime.so: undefined symbol: _Py_ZeroStruct
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python3-setuptools
答え1
sudo apt-get install -f
解決を試みてください。
これにより、依存関係が壊れているシステムの修正が試行されます。