apt-get not woking

Hi,

I have flashed the Jetpack 3.1 on the TX2 and want to install the DJI Onboard SDK on it.
Therefore I needed to install cmake. But if I want to install it with:

sudo apt-get install cmake

It sais:

Package cmake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘cmake’ has no installation candidate

It seems like apt-get is not working for other basic programms like nano as well.

What can I do?

try an update first

$ sudo apt-get update

then try

$ sudo apt-get install cmake

Hi, I already did that, I also added another repository, but it didn’t work. Is it possible, that something at the Jetpack installation didn’t work well?

I’ve just managed to install it, try this also:

$ sudo rm /var/lib/dpkg/lock //just in case
$ sudo dpkg --configure -a
$ sudo apt-get update
$ sudo apt-get install cmake

There shouldn’t be any difference between what I have and what comes with Jetpack.

Unfortunately it doesn’t work either.

When I do “sudo apt-get update” I get this at the end:

Reading package lists… Done
W: Invalid ‘Date’ entry in Release file /var/lib/apt/lists/partial/_var_libopencv4tegra-repo_Release
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving ‘de.archive.ubuntu.com
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving ‘de.archive.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial/InRelease Temporary failure resolving ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/InRelease Temporary failure resolving ‘ports.ubuntu.com
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving ‘de.archive.ubuntu.com

I’m not entirely sure what you’re core issue is, but I would start with these:

[url]apt-get update fails to fetch files, “Temporary failure resolving …” error - Ask Ubuntu
[url]apt - Ubuntu 16.04 Server updates - Temporary failure resolving 'ro.archive.ubuntu.com' - Ask Ubuntu

It actually eliminated some errors, but the problem still occurred.
I just made a clean install of Jetpack and it works.

Thank you for your help :)

I have package cmake installed (R28.1), but I also have extra repositories enabled. Not sure if you just need more repos enabled (see “/etc/apt/sources.list”).

Hi, any update for this ?
I had compared /etc/apt/sources.list between R24.2.1 (TX1 working one) and R28.1 on TX2.
They are same.

But we cannot install any app by ‘sudo apt-get install XXX’

Can anyone help ?

Hi, I have a solution

Go to /etc/apt/sources.list
And remove ‘#’ on

Uncomment the following two lines to add software from the ‘universe’

repository.

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team. Also, please note that software in universe WILL NOT receive any

review or updates from the Ubuntu security team.

deb Index of /ubuntu-ports xenial universe
deb-src Index of /ubuntu-ports xenial universe
deb Index of /ubuntu-ports xenial-updates universe
deb-src Index of /ubuntu-ports xenial-updates universe

Is there any concern for this ?

This is how I do it. Just do an “sudo apt update” after a change.

FYI, if “sudo” itself fails (if permission to sudo is denied), there may have been an error in the “apply_binaries.sh” step of a flash causing incorrect permissions. This would be serious enough you would have to flash again. Not related to packages not found, but worth mentioning because on rare occasion some people have hit issues with sudo (versus what sudo runs as its argument).