I can't install python packages by using pip3 on alpine - python-3.x

Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/tmp/pip-install-xo15v1tw/mock/mock'
I created an alpine container. Dockerfile is
FROM alpine:latest
I built and run it.
#sudo docker build -t alpine .
#sudo docker run -it alpine
Then, I installed python3
#apk add python3
Then, I tried to install mock package and I got error.
#pip3 install mock
...
Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/tmp/pip-install-xo15v1tw/mock/mock'
I tried to install other python packages, but I always got the same error.
I'm running on the container on WSL. The version of alpine is 3.9.4.
How do I solve this problem?

I had the exact same issue running Docker (version 17.09.0 in Ubuntu 16.04, and version 18.06.1 in Ubuntu 18.04) in WSL on Windows 1903, build 18362.145 (my test example is below).
The problem appears to be related to the default overlay2 (and also affects the older overlay) storage driver. Changing to the vfs storage driver by adding the following to /etc/docker/daemon.json makes pip work correctly:
{
"storage-driver": "vfs"
}
However, the vfs storage driver is not recommended due to it's poor performance and high disk usage (it creates a complete copy of the file system in each layer). This is particularly relevant for docker builds where a complete copy of the file system is made for each line in the Dockerfile. So I'm not sure if this is a solution, but it at least indicates where the problem comes from. No other storage drivers appear to be compatible with WSL.
Following are two completely different situations where the overlay2/overlay storage driver appears to cause errors that do not appear to be related to storage at all. I'm sure this would also cause many other errors. I'm not sure if this was an issue before Windows 1903 (I didn't try docker in WSL then), and I'm also not sure what could be causing this (is it on the WSL side, or the overlay2/overlay side? - maybe someone with more knowledge than me would have a comment on this).
My test when using the overlay2/overlay storage driver is as follows:
$ docker run -it alpine
/ # apk add --update py3-pip
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/11) Installing libbz2 (1.0.6-r6)
(2/11) Installing expat (2.2.6-r0)
(3/11) Installing libffi (3.2.1-r6)
(4/11) Installing gdbm (1.13-r1)
(5/11) Installing xz-libs (5.2.4-r0)
(6/11) Installing ncurses-terminfo-base (6.1_p20190105-r0)
(7/11) Installing ncurses-terminfo (6.1_p20190105-r0)
(8/11) Installing ncurses-libs (6.1_p20190105-r0)
(9/11) Installing readline (7.0.003-r1)
(10/11) Installing sqlite-libs (3.28.0-r0)
(11/11) Installing python3 (3.6.8-r2)
Executing busybox-1.29.3-r10.trigger
OK: 68 MiB in 25 packages
/ # pip3 install mock
Collecting mock
Downloading https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/tmp/pip-install-btvxatk0/mock/mock'
/ #
When using the vfs storage driver:
$ docker run -it alpine
/ # apk add --update py3-pip
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/11) Installing libbz2 (1.0.6-r6)
(2/11) Installing expat (2.2.6-r0)
(3/11) Installing libffi (3.2.1-r6)
(4/11) Installing gdbm (1.13-r1)
(5/11) Installing xz-libs (5.2.4-r0)
(6/11) Installing ncurses-terminfo-base (6.1_p20190105-r0)
(7/11) Installing ncurses-terminfo (6.1_p20190105-r0)
(8/11) Installing ncurses-libs (6.1_p20190105-r0)
(9/11) Installing readline (7.0.003-r1)
(10/11) Installing sqlite-libs (3.28.0-r0)
(11/11) Installing python3 (3.6.8-r2)
Executing busybox-1.29.3-r10.trigger
OK: 68 MiB in 25 packages
/ # pip3 install mock
Collecting mock
Downloading https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Collecting six (from mock)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, mock
Successfully installed mock-3.0.5 six-1.12.0
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
/ #
I also found that running apt update in the ububtu official image, I got the following output when using the overlay2/overlay storage driver:
$ docker run -it ubuntu
root#d716ab2aee5c:/# apt update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
At least one invalid signature was encountered.
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
At least one invalid signature was encountered.
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
At least one invalid signature was encountered.
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
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.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
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.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' is not signed.
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.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports InRelease' is not signed.
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.
root#d716ab2aee5c:/#
When using the vfs storage driver:
$ docker run -it ubuntu
root#1422a0121aa2:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [717 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [535 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4169 B]
Get:10 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1220 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7239 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [837 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3902 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B]
Fetched 16.7 MB in 26s (641 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
12 packages can be upgraded. Run 'apt list --upgradable' to see them.
root#1422a0121aa2:/#

Related

apt-get install Python3 in fresh Ubuntu Docker Image results in Error 13 Permission Denied

Update2
Okay, I've rebuilt the Ubuntu server from scratch and the problem still exists. This is how I am doing it.
Create a virtual machine in ESXI with two disk volumes. The first is 50GB and the second is 250GB.
Run the Ubuntu 22.04 LTS install
Create a static IP address
Create two LVM volumes, the 50GB is root and the 350GB is mounted as /var
Select Docker and Prometheus to be installed along with Ubuntu
Let the install run to completion.
Unmount the CD rom when finished and reboot Ubuntu
Login and then sudo bash
docker pull ubuntu
docker run -it ubuntu
apt-get update
apt-get install -y python3
You should get the error
I am running a new/fresh Ubuntu Docker image on a 22.04 LTS Ubuntu server instance. Docker was installed during the Ubuntu 22.04 LTS install. It is a new Ubuntu 22.04 LTS install.
I'm using docker version 20.10.17, build 100c70180f.
I am having trouble getting python3 installed in the running docker container.
To start off, I get the Ubuntu image running in a container:
docker run -ti ubuntu
In the image I run (as the root user)
apt update
Then I run
apt install python3
The installation fails with:
root#6bfb4be344d6:/# apt-get install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libexpat1 libmpdec3 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib libreadline8 libsqlite3-0 media-types python3-minimal python3.10 python3.10-minimal readline-common
Suggested packages:
python3-doc python3-tk python3-venv python3.10-venv python3.10-doc binutils binfmt-support readline-doc
The following NEW packages will be installed:
libexpat1 libmpdec3 libpython3-stdlib libpython3.10-minimal libpython3.10-stdlib libreadline8 libsqlite3-0 media-types python3 python3-minimal python3.10 python3.10-minimal readline-common
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 6494 kB of archives.
After this operation, 23.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.2 [810 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libexpat1 amd64 2.4.7-1ubuntu0.2 [91.0 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10-minimal amd64 3.10.6-1~22.04.2 [2251 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-minimal amd64 3.10.6-1~22.04 [24.3 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 media-types all 7.0.0 [25.5 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libmpdec3 amd64 2.5.1-2build2 [86.8 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 readline-common all 8.1.2-1 [53.5 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 libreadline8 amd64 8.1.2-1 [153 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsqlite3-0 amd64 3.37.2-2ubuntu0.1 [641 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3.10-stdlib amd64 3.10.6-1~22.04.2 [1832 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3.10 amd64 3.10.6-1~22.04.2 [497 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpython3-stdlib amd64 3.10.6-1~22.04 [6910 B]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3 amd64 3.10.6-1~22.04 [22.8 kB]
Fetched 6494 kB in 14s (478 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython3.10-minimal:amd64.
(Reading database ... 4395 files and directories currently installed.)
Preparing to unpack .../libpython3.10-minimal_3.10.6-1~22.04.2_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.6-1~22.04.2) ...
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack .../libexpat1_2.4.7-1ubuntu0.2_amd64.deb ...
Unpacking libexpat1:amd64 (2.4.7-1ubuntu0.2) ...
Selecting previously unselected package python3.10-minimal.
Preparing to unpack .../python3.10-minimal_3.10.6-1~22.04.2_amd64.deb ...
Unpacking python3.10-minimal (3.10.6-1~22.04.2) ...
Setting up libpython3.10-minimal:amd64 (3.10.6-1~22.04.2) ...
Setting up libexpat1:amd64 (2.4.7-1ubuntu0.2) ...
Setting up python3.10-minimal (3.10.6-1~22.04.2) ...
[Errno 13] Permission denied: '/usr/lib/python3.10/__pycache__/__future__.cpython-310.pyc.139849676216832'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)
Looking into the /user/lib/python3.10/__pychache__/ all of the files in the directory are -rw-r--r--
How can the install complain of Permission denied when running as root and the user permissions for every file in the directory is rw?
Update
I upgraded to docker 20.10.22 build 3a2c30b but still am encountering this issue.
I reinstalled Ubuntu 22.04 and this time did not select Docker as one of the packages installed along with Ubuntu. I installed Docker manually after the Ubuntu install completed and after a reboot.
Now it works fine.
I reinstalled ubuntu 22.04 again, just to make sure I could reproduce the problem and indeed, if I select Docker to be installed with Ubuntu, the problem resurfaces.

The command '/bin/sh -c apt-get update && apt-get upgrade' returned a non-zero code: 1

I do get the error message below, while trying to build an Image from a dockerfile.
Any suggestions?
Error Message:
The command '/bin/sh -c apt-get update && apt-get upgrade' returned a non-zero code: 1
Dockerfile screenshot
FROM ubuntu
Maintainer ......
RUN apt-get update && apt-get upgrade
CMD ["echo", "Hello World! from my first docker inage"]
After running the build command screenshot
Sending build context to Docker daemon 3.072kB
Step 1/4: FROM ubuntu
2dc39ba059dc
step 2/4: Maintainer ......
Using cache
-cdea9811b463
Step 3/4 RUN apt-get update 8& apt-get upgrade
Running in 34e13241a292
Get:1 http://archive. ubuntu.con/ubuntu janmy InRe lease [270 kBJ
Get:2 http://security. ubuntu.com/ubuntu jammy- security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu janmy-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.coM/ubuntu jammy-backportS INRelease [99.8 kB]
Get:5 http://archive.ubuntu. com/ubuntu jamny/universe and 64 Packages [17.5 MB]
Get:6 http://security.ubuntu.com/ubuntu jamny- security/restrieted amd64 Packages |353 KB]
Get:7 http://security. ubuntu .com/ubuntu jamny-security/universe amd64 Packages [148 kB]
Get:8 http://security.ubuntu .com/ubuntu jamny-security/main amd 64 Packages |372 kB]
Get:9 http://security.ubuntu.com/ubuntu jamny-security/multiverse amd64 Packages [4644 B]
Get:10 http://archive. ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:11 http://archive. ubuntu .com/ubuntu Jamny/maln amd64 PackageS |1792 KBJ
Get:12 http:://archive.ubuntu .com/ubuntu jamny/multiverse amdő4 Packages [266 kB]
Get:13 http://archive. ubuntu.com/ubuntu jamny- updates /multiverse and64 Packages [7791 B]
Get:14 http://archive. ubuntu.com/ubuntu jammy-updates/main amd 64 Packages [694 kB]
Get: 15 http://archive. ubuntu.com/ubuntu jamny- updates/restricted and 64 Packages [394 kB]
Get:16 http://archive.ubuntu. com/ubuntu jamny-updates/untverse and64 Packages 325 KB]
Get:17 http://archive. ubuntu.com/ubuntu jamny-backports/main amdó4 Packages [3175 B]I
Get:18 http://archive. ubuntu.com/ubuntu jammy- backports/universe amd64 Packages [7285 B]
Fetched 22.6 MB in 7s (3094 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree.
Reading state information...
Galculating upgrade..
The following packages will be upgraded :
zlib1g
1 upgraded, 0 newly installed, 6 to remove and o not upgraded.
Need to get 58.4 KB of archives.
After this operation, 0 B off additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The comnand /bin/sh -C apt-get update && apt-get upgrade' returned a non -zero code: 1
From the screenshot it looks like that apt-get upgrade was aborted. To automatically confirm apt-get's Y/n prompts, you can specify -y flag.
So change RUN line in your Dockerfile to apt-get update && apt-get -y upgrade
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.

Permission denied while installing Node.js v14.10.0 on Ubuntu 20.4

Hello and thanks for looking at this issue.
So I'm trying to install version node.js v14.10.0. NVM installed without any problems, but when I ran -
nvm install v14.10.0
and I got this error
Downloading and installing node v14.10.0...
Downloading https://nodejs.org/dist/v14.10.0/node-v14.10.0-linux-x64.tar.xz...
Warning: Failed to create the file
Warning: /home/revolverclyde/.nvm/.cache/bin/node-v14.10.0-linux-x64/node-v14.1
Warning: 0.0-linux-x64.tar.xz: Permission denied
0.0%curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v14.10.0/node-v14.10.0-linux-x64.tar.xz failed, trying source.
grep: /home/revolverclyde/.nvm/.cache/bin/node-v14.10.0-linux-x64/node-v14.10.0-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Downloading https://nodejs.org/dist/v14.10.0/node-v14.10.0.tar.xz...
Warning: Failed to create the file
Warning: /home/revolverclyde/.nvm/.cache/src/node-v14.10.0/node-v14.10.0.tar.xz
Warning: : Permission denied
0.0%curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v14.10.0/node-v14.10.0.tar.xz failed, trying source.
grep: /home/revolverclyde/.nvm/.cache/src/node-v14.10.0/node-v14.10.0.tar.xz: No such file or directory
Provided file to checksum does not exist.
Any suggestions?
Thanks!
UPDATE!!
The error I'm getting above may have something do to with an error I got while installing NodeSource. I'm new to this maybe I'm wrong, but I thought it would be helpful to know anyway.
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
## Installing the NodeSource Node.js 14.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Ign:3 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu focal InRelease
Ign:4 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu focal InRelease
Ign:6 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease
Hit:7 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 Release
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:9 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 Release
Err:10 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Get:12 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu focal 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.
Error executing command, exiting
"Err:10 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]" is the specific error if you don't want to hurt your eyes with the dense readout.
Fixed. I am quoting another poster here. I want to give Vishnu the credit.
"I had the same issue. It was due to the lack of "libssl-dev". Run the following command before you start the installation process for nvm
sudo apt-get install build-essential libssl-dev curl git-core"
It's a permission error. You can try to run it with the sudo command.
sudo nvm install v14.10.0

Issues installing gdal-bin (libmysqlclient21 dependency) on 20.04.3 (databricks job clusters)

I've had, in the past, gdal utilities installed successfully on a Databricks Cluster running 20.04.3 LTS (focal).
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
$ sudo apt-get install -y gdal-bin
Each time a databricks job cluster startups, my sample notebook attempts to install GDAL. I've attempted a series of apt-get updates/upgrades; and just when I think the issue has gone away; the next day it comes back again (no change of code, cluster spec, etc.)
Most recently the issue occurs once it hits installation for libmysqlclient21, e.g:
Err:27 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient21 amd64 8.0.26-0ubuntu0.20.04.3
404 Not Found [IP: 91.189.88.142 80]
My understanding is that these issues arise when the packaging versions are no longer supported, and noticed that libmysqlclient21 has come out with a recent patch as of the 25th of October (when the issue started arising).
I've noticed when I run %sh sudo apt-get --fix-missing -y update and apt policy libmysqlclient21, prior to a successful installation, I can see it's found 8.0.27-0ubuntu0.20.04.1:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [628 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,635 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [801 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,183 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,086 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [679 kB]
Fetched 6,374 kB in 19s (329 kB/s)
Reading package lists...
libmysqlclient21:
Installed: (none)
Candidate: 8.0.27-0ubuntu0.20.04.1
Version table:
8.0.27-0ubuntu0.20.04.1 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
On an unsuccessful run, it's returning:
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists...
libmysqlclient21:
Installed: (none)
Candidate: 8.0.26-0ubuntu0.20.04.3
Version table:
8.0.26-0ubuntu0.20.04.3 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
8.0.26-0ubuntu0.20.04.2 500
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
I've been scratching my head trying to understand what could be causing this, and what else to do to work around the problem. I'd prefer it to handle the installation automatically without having to hardcode specific versions (in case other issues were to arise); but not against targeting specific versions if I know they'll be supported on the current platform.
Any advice appreciated.
I had success by putting
sudo apt clean && sudo apt update --fix-missing -y && sudo apt install -y libmysqlclient21
before trying to install gdal and it seems to be working now....
...nevermind began failing the next day again...

Error while installing audit

While installing the sudo apt-get install auditd, i get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
auditd is already the newest version (1:2.4.5-1ubuntu2.1).
The following package was automatically installed and is no longer required:
libprelude2v5
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 706 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up auditd (1:2.4.5-1ubuntu2.1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Job for auditd.service failed because the control process exited with error code. See "systemctl status auditd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript auditd, action "restart" failed.
dpkg: error processing package auditd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
auditd
E: Sub-process /usr/bin/dpkg returned an error code (1)
What is this error? How can i get rid of it?
And then i used this sudo apt-get install audit. Now i get this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package audit
Please help me. Thank you.
When i try sudo apt-get update , i get this :
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Get:3 http://packages.microsoft.com/repos/vscode stable InRelease [2,802 B]
Hit:5 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:7 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Get:8 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Ign:9 http://apt.puppetlabs.com xenial InRelease
Get:10 http://apt.puppetlabs.com xenial Release [57.5 kB]
Get:11 http://apt.puppetlabs.com xenial Release.gpg [801 B]
Err:11 http://apt.puppetlabs.com xenial Release.gpg
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7F438280EF8D349F
Get:12 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [785 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [720 kB]
Fetched 1,889 kB in 2s (678 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.puppetlabs.com xenial Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7F438280EF8D349F
W: Failed to fetch http://apt.puppetlabs.com/dists/xenial/Release.gpg The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7F438280EF8D349F
W: Some index files failed to download. They have been ignored, or old ones used instead.

Resources