WSL sudo apt Windowsファイルパスを試してください。

WSL sudo apt Windowsファイルパスを試してください。

数日前、Ubuntu 20.04.4 Focal Fossa(LTS)を使用してWSLをインストールしました。私が経験しているいくつかのパッケージの問題(具体的にはgradle)を解決しようとしていますが、sudo apt --fix-broken installunixファイルパスと混在するWindowsファイルパスを使用しようとしていると思うため、問題が発生することがわかりません。

python3: can't open file 'C:\\usr\\bin\\py3clean': [Errno 2] No such file or directoryバックスラッシュの使用と組み合わせてこの問題を引き起こすバグのため、C:ナビゲーションに問題があると考えられますが、パスは/usr/bin/py3clean正当な既存のパスです。

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libsasl2-modules
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-apport
The following packages will be upgraded:
  python3-apport
1 upgraded, 0 newly installed, 0 to remove and 156 not upgraded.
5 not fully installed or removed.
Need to get 0 B/249 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 31852 files and directories currently installed.)
Preparing to unpack .../python3-apport_2.20.11-0ubuntu27.21_all.deb ...
python3: can't open file 'C:\\usr\\bin\\py3clean': [Errno 2] No such file or directory
dpkg: warning: old python3-apport package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
python3: can't open file 'C:\\usr\\bin\\py3clean': [Errno 2] No such file or directory
dpkg: error processing archive /var/cache/apt/archives/python3-apport_2.20.11-0ubuntu27.21_all.deb (--unpack):
 new python3-apport package pre-removal script subprocess returned error exit status 2
python3: can't open file 'C:\\usr\\bin\\py3compile': [Errno 2] No such file or directory
dpkg: error while cleaning up:
 installed python3-apport package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/python3-apport_2.20.11-0ubuntu27.21_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

py3cleanファイルする存在する:

$ ll /usr/bin/ | grep py3
-rwxr-xr-x 1 root   root        7813 Mar 13  2020 py3clean*
-rwxr-xr-x 1 root   root       12120 Mar 13  2020 py3compile*
lrwxrwxrwx 1 root   root          31 Mar 13  2020 py3versions -> ../share/python3/py3versions.py*

ベストアンサー1

おすすめ記事