termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
775 stars 160 forks source link

can't update #204

Open spz2020 opened 2 years ago

spz2020 commented 2 years ago

from:https://github.com/termux/proot-distro/issues/189

Problem description

root@localhost:~# apt update Ign:1 http://ports.ubuntu.com/ubuntu-ports hirsute InRelease Ign:2 http://ports.ubuntu.com/ubuntu-ports hirsute-updates InRelease Ign:3 http://ports.ubuntu.com/ubuntu-ports hirsute-security InRelease Err:4 http://ports.ubuntu.com/ubuntu-ports hirsute Release Could not open file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_hirsute_Release - open (13: Permission denied) [IP: 240.0.0.245 80] Err:5 http://ports.ubuntu.com/ubuntu-ports hirsute-updates Release Could not open file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_hirsute-updates_Release - open (13: Permission denied) [IP: 240.0.0.245 80] Err:6 http://ports.ubuntu.com/ubuntu-ports hirsute-security Release Could not open file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_hirsute-security_Release - open (13: Permission denied) [IP: 240.0.0.245 80] Reading package lists... Error! W: Download is performed unsandboxed as root as file '/var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_hirsute_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) E: The repository 'http://ports.ubuntu.com/ubuntu-ports hirsute Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ports.ubuntu.com/ubuntu-ports hirsute-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ports.ubuntu.com/ubuntu-ports hirsute-security Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Could not create temporary file for /var/cache/apt/srcpkgcache.bin - mkstemp (13: Permission denied) E: The package lists or status file could not be parsed or opened. root@localhost:~# Screenshot_20211121-141828

What steps will reproduce the bug?

proot-distro install ubuntu proot-distro login ubuntu apt update

What is the expected behavior?

can update

spz2020 commented 2 years ago

ps: i'm test AnLinux install is ok

spz2020 commented 2 years ago

hello?

michalbednarski commented 2 years ago

Reproduction steps give successful update here, so probably this is device specific issue

You can try:

  1. Updating proot and proot-distro: pkg up
  2. Reinstalling ubuntu in proot-distro (Warning: command wipes data of guest system): proot-distro reset ubuntu
  3. If issue still appears after reinstall, collect traces of failing update and attach results saved to typescript file to issue:
    PROOT_VERBOSE=9 script -c 'proot-distro reset ubuntu && proot-distro login ubuntu -- apt update'