私が書くとき、私dpkg --configure -a
はこのエラーを受け取りました:
dpkg: error processing package python-numpy (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: error processing package python-pil:amd64 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of python-scipy:
python-scipy depends on python-numpy (>= 1:1.13.1); however:
Package python-numpy is not configured yet.
python-scipy depends on python-numpy-abi9; however:
Package python-numpy-abi9 is not installed.
Package python-numpy which provides python-numpy-abi9 is not configured yet.
dpkg: error processing package python-scipy (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-matplotlib:
python-matplotlib depends on python-numpy (>= 1:1.13.1); however:
Package python-numpy is not configured yet.
python-matplotlib depends on python-numpy-abi9; however:
Package python-numpy-abi9 is not installed.
Package python-numpy which provides python-numpy-abi9 is not configured yet.
dpkg: error processing package python-matplotlib (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-numpy
python-pil:amd64
python-scipy
python-matplotlib
これに従いましたが、sudo apt-get update
エラーが発生しました:
Hit:8 https://packages.microsoft.com/repos/ms-teams stable InRelease
Get:9 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 88.7 kB in 1s (98.6 kB/s)
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f5953b88740 (most recent call first):
Aborted (core dumped)
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
何が間違っているのか、何かアイデアはありますか?
当初、私は Python を再インストールしようとしましたが、<prefix>
問題 (2 番目のエラー出力) のためにできませんでした。
status
ファイルをバックアップします:
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.bak
、、およびその説明を/var/lib/dpkg/status
削除して編集し、 を実行します。python-numpy
python-pil:amd64
python-scipy
python-matplotlib
sudo dpkg --configure -a
次のエラーを解決するには:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
stackoverflow に関するこの Q/A を参照してください。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加