New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install the .NET SDK on Windows Subsystem Linux Ubuntu 18.04 - Permission denied #3722
Comments
Wasn't able to reproduce here on 18305 with your steps (not that I think the Windows build matters vs. 17134, but in principle it could). Your If it were me I would do a
That's not authoritative in any way. You can find different raindance alternatives on the Interwebs if you don't like the one above. Ref #640 cuz rename error (albeit different). |
Dear therealkenc, thank you for your help. I am desperate feeling tiny for Linux world. Any further tip? tothz@hp-PC:~$ sudo rm -fr /var/cache/apt [sudo] password for tothz: tothz@hp-PC:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bak tothz@hp-PC:~$ sudo touch /var/lib/dpkg/status tothz@hp-PC:~$ sudo apt clean tothz@hp-PC:~$ sudo apt update && sudo apt upgrade Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [235 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [88.9 kB] Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [110 kB] Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [62.2 kB] Get:10 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1440 B] Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [996 B] Get:12 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [476 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [177 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [6992 B] Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [3076 B] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [706 kB] Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [171 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6372 B] Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [3356 B] Get:23 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3468 B] Get:24 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1604 B] Fetched 16.1 MB in 19s (830 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. tothz@hp-PC:~$ tothz@hp-PC:~$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb tothz@hp-PC:~$ sudo dpkg -i packages-microsoft-prod.deb Selecting previously unselected package packages-microsoft-prod. (Reading database ... 37 files and directories currently installed.) Preparing to unpack packages-microsoft-prod.deb ... Unpacking packages-microsoft-prod (1.0-ubuntu18.04.1) ... dpkg: dependency problems prevent configuration of packages-microsoft-prod: packages-microsoft-prod depends on apt-transport-https; however: Package apt-transport-https is not installed. packages-microsoft-prod depends on ca-certificates; however: Package ca-certificates is not installed. dpkg: error processing package packages-microsoft-prod (--install): dependency problems - leaving unconfigured Errors were encountered while processing: packages-microsoft-prod tothz@hp-PC:~$ tothz@hp-PC:~$ tothz@hp-PC:~$ sudo add-apt-repository universe 'universe' distribution component is already enabled for all sources. tothz@hp-PC:~$ tothz@hp-PC:~$ sudo apt-get install apt-transport-https Reading package lists... Error! E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages - open (2: No such file or directory) E: Problem opening /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. tothz@hp-PC:~$ tothz@hp-PC:~$ udo apt-get update Command 'udo' not found, but can be installed with: sudo apt install udo tothz@hp-PC:~$ sudo apt-get update Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Splitting up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_InRelease into data and signature failed Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_InRelease into data and signature failed Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-backports_InRelease into data and signature failed Reading package lists... Error! W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.KdF7Yf - IsAccessibleBySandboxUser (13: Permission denied) W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.rXgKvd - IsAccessibleBySandboxUser (13: Permission denied) W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.EAwZgb - IsAccessibleBySandboxUser (13: Permission denied) W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.tsdA28 - IsAccessibleBySandboxUser (13: Permission denied) W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: Splitting up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_InRelease into data and signature failed W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu bionic-updates InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_InRelease into data and signature failed W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu bionic-backports InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-backports_InRelease into data and signature failed W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_InRelease into data and signature failed W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-backports_InRelease into data and signature failed W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Splitting up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_InRelease into data and signature failed W: Some index files failed to download. They have been ignored, or old ones used instead. E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages - open (2: No such file or directory) E: Problem opening /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. tothz@hp-PC:~$ tothz@hp-PC:~$ tothz@hp-PC:~$ sudo apt-get install dotnet-sdk-2.2 Reading package lists... Error! E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages - open (2: No such file or directory) E: Problem opening /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. tothz@hp-PC:~$ |
Well two options. (1) Follow that google link and follow the various questionable advice given until one of them works or, in the alternative, breaks your system beyond redemption. That is standard operating procedure. (2) Uninstall Ubuntu from the store. Reinstall. Make |
Dear therealkenc, thank you for your help. I am desperate feeling tiny for Linux world. Any further tip? tothz@hp-PC:~$ sudo rm -fr /var/cache/apt [sudo] password for tothz: tothz@hp-PC:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bak tothz@hp-PC:~$ sudo touch /var/lib/dpkg/status tothz@hp-PC:~$ sudo apt clean tothz@hp-PC:~$ sudo apt update && sudo apt upgrade Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [235 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [88.9 kB] Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [110 kB] Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [62.2 kB] Get:10 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1440 B] Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [996 B] Get:12 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [476 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [177 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [6992 B] Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [3076 B] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [706 kB] Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [171 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6372 B] Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [3356 B] Get:23 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3468 B] Get:24 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1604 B] Fetched 16.1 MB in 19s (830 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. tothz@hp-PC:~$ tothz@hp-PC:~$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb tothz@hp-PC:~$ sudo dpkg -i packages-microsoft-prod.deb Selecting previously unselected package packages-microsoft-prod. (Reading database ... 37 files and directories currently installed.) Preparing to unpack packages-microsoft-prod.deb ... Unpacking packages-microsoft-prod (1.0-ubuntu18.04.1) ... dpkg: dependency problems prevent configuration of packages-microsoft-prod: packages-microsoft-prod depends on apt-transport-https; however: Package apt-transport-https is not installed. packages-microsoft-prod depends on ca-certificates; however: Package ca-certificates is not installed. dpkg: error processing package packages-microsoft-prod (--install): dependency problems - leaving unconfigured Errors were encountered while processing: packages-microsoft-prod tothz@hp-PC:~$ tothz@hp-PC:~$ tothz@hp-PC:~$ sudo add-apt-repository universe 'universe' distribution component is already enabled for all sources. tothz@hp-PC:~$ tothz@hp-PC:~$ sudo apt-get install apt-transport-https Reading package lists... Error! E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages - open (2: No such file or directory) E: Problem opening /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. tothz@hp-PC:~$ tothz@hp-PC:~$ udo apt-get update Command 'udo' not found, but can be installed with: sudo apt install udo tothz@hp-PC:~$ sudo apt-get update Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Splitting up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_InRelease into data and signature failed Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_InRelease into data and signature failed Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-backports_InRelease into data and signature failed Reading package lists... Error! W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.KdF7Yf - IsAccessibleBySandboxUser (13: Permission denied) W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.rXgKvd - IsAccessibleBySandboxUser (13: Permission denied) W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.EAwZgb - IsAccessibleBySandboxUser (13: Permission denied) W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.tsdA28 - IsAccessibleBySandboxUser (13: Permission denied) W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: Splitting up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_InRelease into data and signature failed W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu bionic-updates InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_InRelease into data and signature failed W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu bionic-backports InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-backports_InRelease into data and signature failed W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_InRelease into data and signature failed W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-backports_InRelease into data and signature failed W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Splitting up /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_InRelease into data and signature failed W: Some index files failed to download. They have been ignored, or old ones used instead. E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages - open (2: No such file or directory) E: Problem opening /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. tothz@hp-PC:~$ tothz@hp-PC:~$ tothz@hp-PC:~$ sudo apt-get install dotnet-sdk-2.2 Reading package lists... Error! E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages - open (2: No such file or directory) E: Problem opening /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. tothz@hp-PC:~$ |
If you are starting from scratch do not muck with your From a clean-ish 18.04 slate from the Store I was able to get dotnet-sdk-2.2 installed with the following:
The order matters. That was gleaned from the discussion here, which is probably where you'll find folks versed in the matter (the dotnet/core-setup github in general; not that issue specifically). If you die at the That's about the best I can do. There is unfortunately no WSL actionable here. Bonne chance. |
That sentence was the key: After I disabled all functions of the third-party antivirus software and firewall, I reinstalled Ubuntu and executed the "official" steps to install SDK. And it finally succeeded. (This process took for almost 40 minutes and during this period my laptop was unprotected, so it's not a perfect way to do it.) Thank you for your support. |
Glad you got dotnet installed, but be aware this isn't a "40 minute" or "this period" kind of thing (assuming that that was the implication). You got
Worth noting that disabling contrast uninstalling is not necessarily sufficient, because some (most?) AV software leaves NT driver hooks resident that can potentially conflict with WSL. It depends on the specifics of the third-party software. Disabling was sufficient for you in this case, and disabling might continue to work in your case. This is just a heads up for the search engines. |
I try to install Install .NET SDK (instruction here) to WSL Ubuntu 18.04 (instruction here) (package here)
I could install Ubuntu but I can not install .NET SDK. It seems that something is wrong with permissions althought the commands I copied from the instructions uses sudo...
My Windows bulid number is: "Microsoft Windows [Version 10.0.17134.471]"
The text was updated successfully, but these errors were encountered: