2

I want to install default-libmysqlclient-dev using

sudo apt-get install default-libmysqlclient-dev

But I get this output

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 default-libmysqlclient-dev : Depends: libmysqlclient-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So I try a different approach using aptitude

sudo aptitude -f install default-libmysqlclient-dev

And now I get

The following NEW packages will be installed:
  default-libmysqlclient-dev libmysqlclient-dev{ab}
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,126 kB of archives. After unpacking 6,959 kB will be used.
The following packages have unmet dependencies:
 libmysqlclient-dev : Depends: libmysqlclient20 (= 5.7.21-1ubuntu1) but 5.7.27-0ubuntu0.18.04.1 is installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     default-libmysqlclient-dev [Not Installed]
2)     libmysqlclient-dev [Not Installed]



Accept this solution? [Y/n/q/?]

After accepting the solution (Y), I get this output

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

So nothing was installed

System Information

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
aarch64

I think for these specs, I have package available for download

How can I troubleshoot this?

EDIT

Command

grep ^deb -r /etc/apt/ --include=*.list

Outputs:

/etc/apt/sources.list:deb http://ports.ubuntu.com/ubuntu-ports/ bionic main universe restricted multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security main
/etc/apt/sources.list:deb http://ports.ubuntu.com/ubuntu xenial-security main
/etc/apt/sources.list.d/cuda-10-0-local-10.0.326.list:deb file:///var/cuda-repo-10-0-local-10.0.326 /
/etc/apt/sources.list.d/visionworks-sfm-repo.list:deb-src file:///var/visionworks-sfm-repo /
/etc/apt/sources.list.d/visionworks-sfm-repo.list:deb file:///var/visionworks-sfm-repo /
/etc/apt/sources.list.d/visionworks-tracking-repo.list:deb-src file:///var/visionworks-tracking-repo /
/etc/apt/sources.list.d/visionworks-tracking-repo.list:deb file:///var/visionworks-tracking-repo /
/etc/apt/sources.list.d/visionworks-repo.list:deb-src file:///var/visionworks-repo /
/etc/apt/sources.list.d/visionworks-repo.list:deb file:///var/visionworks-repo /
fabda01
  • 243
  • 2
  • 7
  • What is the output of `grep ^deb -r /etc/apt/ --include=*.list`? If long - use pastebin. – N0rbert Feb 22 '21 at 08:55
  • @N0rbert Added output to question – fabda01 Feb 22 '21 at 09:04
  • Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories) You have weird broken lines in sources.list. Restore them to default. They should contain *bionic*, *bionic-updates*, *bionic-security*. Enabling *bionic-proposed* is not recommended on production systems. – N0rbert Feb 22 '21 at 09:04
  • @N0rbert which line specifically are broken? – fabda01 Feb 22 '21 at 09:08
  • @N0rbert Should I use this one (https://gist.github.com/h0bbel/4b28ede18d65c3527b11b12fa36aa8d1) as my `sources.list`? – fabda01 Feb 22 '21 at 09:13
  • Which hardware do you use for this 18.04? Is it ARM/ARM64 (Raspberry, Jetson) or x86_64 PC ? – N0rbert Feb 22 '21 at 09:27
  • @N0rbert it is ARM64 (Jetson) – fabda01 Feb 22 '21 at 09:29

1 Answers1

0

You should fix your repositories. Change the following lines of /etc/apt/sources.list

deb http://ports.ubuntu.com/ubuntu-ports/ bionic main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main
deb http://ports.ubuntu.com/ubuntu xenial-security main

to the following:

deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse

Then run sudo apt-get update to update package lists and proceed with installation of latest upgrades to Ubuntu 18.04.5 LTS by sudo apt-get dist-upgrade .

N0rbert
  • 97,162
  • 34
  • 239
  • 423
  • Commented out old repositories lines and added the new ones for Nvidia Jetson, but now I get ```E: The repository 'http://ports.ubuntu.com/ubuntu bionic Release' does not have a Release file.``` . `aptitude` also stopped working – fabda01 Feb 22 '21 at 09:40
  • Oh, so we need to change *ports* to *archive*. And retry. – N0rbert Feb 22 '21 at 09:41
  • It seems to be finding the repositories now. But now I have an issue with storage: ```Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/Contents-arm64 Write error - write (28: No space left on device)``` My device has limited storage (16Gb) Could this apt-get update consume all the storage? I don't remember how much storage it had before updating the repositories. – fabda01 Feb 22 '21 at 09:50
  • Very possible, as it was not updated long time. If it is microsd - try to clone it to bigger one. Or mount `/var/cache/apt/archives` to external bigger media. – N0rbert Feb 22 '21 at 10:10