
Ubuntu日本語フォーラム
ログインしていません。
質問させていただきます。
現在WSL2を利用しているのですが最近apt update&apt upgradeをした際にpyhon3-aptのアップデートに失敗してしまいます。
エラー文は
python3-apt (1.6.5ubuntu0.4) を設定しています ...
Traceback (most recent call last):
File "/usr/bin/py3compile", line 290, in <module>
main()
File "/usr/bin/py3compile", line 270, in main
options.force, options.optimize, e_patterns)
File "/usr/bin/py3compile", line 156, in compile
cfn = interpreter.cache_file(fn, version)
File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
(fname[:-3], self.magic_tag(version), last_char))
File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
return self._execute('import imp; print(imp.get_tag())', version)
File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 127
dpkg: パッケージ python3-apt の処理中にエラーが発生しました (--configure):
installed python3-apt package post-installation script subprocess returned error exit status 1
処理中にエラーが発生しました:
python3-apt
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo dpkg --configure -aをしても似たような文が出てきてしまいます。
python3-apt (1.6.5ubuntu0.4) を設定しています ...
Traceback (most recent call last):
File "/usr/bin/py3compile", line 290, in <module>
main()
File "/usr/bin/py3compile", line 270, in main
options.force, options.optimize, e_patterns)
File "/usr/bin/py3compile", line 156, in compile
cfn = interpreter.cache_file(fn, version)
File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
(fname[:-3], self.magic_tag(version), last_char))
File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
return self._execute('import imp; print(imp.get_tag())', version)
File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 127
dpkg: パッケージ python3-apt の処理中にエラーが発生しました (--configure):
installed python3-apt package post-installation script subprocess returned error exit status 1
処理中にエラーが発生しました:
python3-apt
またコレを調べているときに他の質問サイトに似たようなモノがありましたが解決には至っていませんでした。
https://askubuntu.com/questions/1163775/errors-while-processing-python3-apt-usb-creator-apport-python-apt
これはpyenvが入っているからなのでしょうか
このような場合どうすれば良いでしょうか。
よろしくお願いします。
オフライン