Skip to content
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

/var/lib/apt/list permission problem building under WSL2 and Docker Desktop #5798

Closed
1 task done
mjtimblin opened this issue Oct 6, 2023 · 8 comments
Closed
1 task done

Comments

@mjtimblin
Copy link

What happened?

All builds that I've tried from main fail due to broken apt sources. I get the following output:

[🐳|🔨]   E: Failed to fetch http://security.debian.org/dists/bookworm-security/main/binary-arm64/Packages  Could not change permissions for temporary file /var/lib/apt/lists/partial/security.debian.org_dists_bookworm-security_main_binary-arm64_Packages.3nTJ0x - fchmod (1: Operation not permitted)
[🐳|🔨]   E: Failed to fetch http://deb.debian.org/debian/dists/bookworm/main/i18n/Translation-en  404  Not Found [IP: 199.232.30.132 80]
[🐳|🔨]   E: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/main/binary-arm64/Packages  Could not change permissions for temporary file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages.KIhczL - fchmod (1: Operation not permitted)
[🐳|🔨]   E: Failed to fetch http://deb.debian.org/debian/dists/bookworm-backports/main/binary-arm64/Packages  Could not change permissions for temporary file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-backports_main_binary-arm64_Packages.LyFuuY - fchmod (1: Operation not permitted)
[🐳|🔨]   E: Some index files failed to download. They have been ignored, or old ones used instead.
[🐳|🚸] Command failed, retrying in 5s [ chroot_sdcard_apt_get_update ]
[🐳|🚸] Command failed 3 times, giving up [ chroot_sdcard_apt_get_update ]
[🐳|💥] Error 1 occurred in main shell [ at /armbian/lib/functions/rootfs/distro-agnostic.sh:226

How to reproduce?

I'm running the command from within WSL2 on Windows 11 with Docker Desktop running. I ran the following build command:

./compile.sh \
  BOARD=orangepi5 \
  BRANCH=legacy \
  RELEASE=bookworm \
  BUILD_MINIMAL=yes \
  BUILD_DESKTOP=no \
  KERNEL_CONFIGURE=no \
  SHARE_LOG=yes

Branch

main (main development branch)

On which host OS are you observing this problem?

Other

Relevant log URL

https://paste.next.armbian.com/iquculijin

Code of Conduct

  • I agree to follow this project's Code of Conduct
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Jira ticket: AR-1885

@igorpecovnik
Copy link
Member

with Docker Desktop running

Don't know if this was ever tested. We tested on several different machines with default WSL2 installation. It worked even on ARM based Windows 11. Can this be disabled somehow?

@rpardini rpardini changed the title Broken apt sources make build fail /var/lib/apt/list permission problem building under WSL2 and Docker Desktop Oct 9, 2023
@rpardini
Copy link
Member

rpardini commented Oct 9, 2023

This scenario is untested, I was not aware Docker Desktop would infiltrate wsl2.
Please post the .docker. launcher logs as well, they'll be in output/logs folder.

Try to avoid using docker:
PREFER_DOCKER=no ./compile.sh ....
(PREFER_DOCKER=no has to be an env, not a cmdline param, thus needs to come first)

@mjtimblin
Copy link
Author

mjtimblin commented Oct 10, 2023

When I installed docker desktop a while ago, it defaulted to using WSL2 as a backend. See their docs if you're curious.

The only docker related logs in the output/logs folder are log-docker.*.log.ans and summary-docker-*.md. I've attached them here (logs.zip).

I'm unable to build without docker at this time since my WSL2 OS (focal) isn't supported to build armbian natively.

@rpardini
Copy link
Member

My guess is this Docker Desktop WSL2 backend is messing up the Docker volumes.
Try cleaning all volumes? (docker system prune -a or some such)
Try running with DEBUG=yes and see if that gives you any hints in the log-docker.

Otherwise yeah use WSL2 jammy sans-docker.

@dieter-l-git
Copy link

I did not use Docker Desktop, I'm using WSL2 Ubuntu 22.04 under Win10 and installing docker on Ubuntu:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

With this Build is working

@rpardini
Copy link
Member

WSL2 jammy is the only supported build host on Windows.
Using any kind of Docker is unsupported, might or not work.

@xfl12345
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants