WSL sudo apt Windows 파일 경로를 사용해 보세요.

WSL sudo apt Windows 파일 경로를 사용해 보세요.

며칠 전에 Ubuntu 20.04.4 LTS(Focal Fossa)를 사용하여 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*

관련 정보