I have a container with ubuntu 22.04 lts and when I need to install a package or program that requires pyhton3.x-minimal it throws a permissions denied error, I am also root. It is something strange but I have not been able to solve it.
This is program installa
root@c0f46f619a6c:/var/www/html#apt-get install systemd
And the installation throws the following message
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
dmsetup gir1.2-glib-2.0 libcryptsetup12 libdevmapper1.02.1 libgirepository-1.0-1 libip4tc2 libjson-c5 libkmod2 libmpdec3 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib
networkd-dispatcher python3 python3-dbus python3-gi python3-minimal python3.10 python3.10-minimal systemd-timesyncd
Suggested packages:
iw | wireless-tools python3-doc python3-tk python3-venv python-dbus-doc python3.10-venv python3.10-doc binutils binfmt-support systemd-container libfido2-1 libtss2-esys-3.0.2-0
libtss2-mu0 libtss2-rc0 policykit-1
The following NEW packages will be installed:
dmsetup gir1.2-glib-2.0 libcryptsetup12 libdevmapper1.02.1 libgirepository-1.0-1 libip4tc2 libjson-c5 libkmod2 libmpdec3 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib
networkd-dispatcher python3 python3-dbus python3-gi python3-minimal python3.10 python3.10-minimal systemd systemd-timesyncd
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.2 MB of archives.
After this operation, 41.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-minimal amd64 3.10.6-1~22.04.2ubuntu1 [810 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10-minimal amd64 3.10.6-1~22.04.2ubuntu1 [2263 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-minimal amd64 3.10.6-1~22.04 [24.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 libmpdec3 amd64 2.5.1-2build2 [86.8 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-stdlib amd64 3.10.6-1~22.04.2ubuntu1 [1831 kB]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython3.10-minimal:amd64.
(Reading database ... 19257 files and directories currently installed.)
Preparing to unpack .../libpython3.10-minimal_3.10.6-1~22.04.2ubuntu1_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.6-1~22.04.2ubuntu1) ...
Selecting previously unselected package python3.10-minimal.
Preparing to unpack .../python3.10-minimal_3.10.6-1~22.04.2ubuntu1_amd64.deb ...
Unpacking python3.10-minimal (3.10.6-1~22.04.2ubuntu1) ...
Setting up libpython3.10-minimal:amd64 (3.10.6-1~22.04.2ubuntu1) ...
Setting up python3.10-minimal (3.10.6-1~22.04.2ubuntu1) ...
[Errno 13] Permission denied: '/usr/lib/python3.10/__pycache__/__future__.cpython-310.pyc.140322885704192'dpkg: error processing package python3.10-minimal (--configure):
installed python3.10-minimal package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
python3.10-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried changing some execute and write permissions but the problem persists