SDKManager problems

I download the sdkmanager named sdkmanager_0.9.14-4964_amd64.deb from: https://developer.nvidia.com/nvidia-sdk-manager.

Then I install the .deb using the command:
dpkg -i install sdkmanager_0.9.14-4964_amd64.deb

Installed successfully.

When I open the terminal and type sdkmanager,then it will show this following:
/bin/sh: 1: lsb_release: not found

How to solve the problem?
THANKS

Is the host Ubuntu? Normally this is present. Perhaps this if missing:

sudo apt-get install lsb-release

Hi linuxdev @linuxdev, I try to install the lsb-release obeyed your way.
But when I type the “lsb-release -a” on the terminal and it shows as following:

Traceback (most recent call last):
File “/usr/lib/command-not-found”, line 27, in
from CommandNotFound.util import crash_guard
ModuleNotFoundError: No module named ‘CommandNotFound’

Also after installing the lsb-release from apt-get, SDKManager also shows that my computer is not linux but actually my host computer is ubuntu 16.04.

Thanks !

The package has a hyphen, “lsb-release”, but the command has an underscore, “lsb_release”. If a script somewhere is looking for the executable, then it will fail to find it using a hyphen in the name. However, modules are loaded into this via the package “lsb-core”, and thus you might need to add this (it seems kind of silly that release does not install core, but someone probably had a good reason for not adding this automatically):

sudo apt-get install lsb-core

Btw, any system using a Linux kernel is Linux. Ubuntu is just a distribution with different packages surrounding the kernel, so is Fedora, so on. You might even consider Ubuntu to be a distribution of Debian, which in turn is a distribution of Linux. Normally lsb is checked as a way to be more portable across various distributions since each might have different default packages or configuration methods.

Not sure this is the cause, but I’m currently installing same sdk-manager and following the online instructions I’ve succefully used instead:

sudo apt install ./sdkmanager_0.9.14-4964_amd64.deb

Not sure it will be different for your case, but might be worth to try. (I had an old sdk-manager deb previously installed, though).

Additional note that may help (mainly sdkmanager developers), I did face an error message when running this from home directory, having downloaded the deb package into a USB disk:

sudo apt install /media/nvidia/Data/JetPack/sdkmanager_0.9.14-4964_amd64.deb
....
Paramétrage de sdkmanager (0.9.14-4964) ...
N: Can't drop privileges for downloading as file '/media/nvidia/Data/JetPack/sdkmanager_0.9.14-4964_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Then cd to deb folder and using:

sudo apt install ./sdkmanager_0.9.14-4964_amd64.deb

it said new version was already installed. Working fine so far.

[EDIT: Also noted that running ‘xhost +’ (not to be tried if network isn’t sure) resulted in sdkmanager to die or at least disappear…Resumed fine after reboot.]

Hi, linuxdev.@linuxdev
Thanks for your answer.
I try to follow your way to install lsb-core, but get the same error as usual as following:

Traceback (most recent call last):
File “/usr/lib/command-not-found”, line 27, in
from CommandNotFound.util import crash_guard
ModuleNotFoundError: No module named ‘CommandNotFound’

I think this is the bad thing I meet it hah.

Hi Honey_Patouceul. @Honey_Patouceul
Thanks for your answer.

I try your way to install the SDKManager once again and get the same error as usual.
I am also able to install in other PC host and SDKManager can be used.
I think I can not use SDKManager in my computer and now I backup my files and ready to install the Ubuntu18.04 instead of Ubuntu16.04 LTS. God bless me.

Technically I think a 16.04 host should work, but far more people will use 18.04, so I think this is better tested. In the case where the lsm software is not found it does make me wonder if something was wrong in the 16.04 install, so either way going to 18.04 is likely the best next step.

I did use a Ubuntu-16.04 host in my case, so this shouldn’t be the root cause, although there may be variations between different locales. I used french, did you use a non US locale ? (not sure, but in previous JetPack versions, a warning was shown about non US-locale versions). Never seen problems with french locale, but it may be different with other locales. You may tell more and hopefully get feedback from users from your zone if this is relevant.

I can verify that some non-en_US locales in the path of running JetPack/SDKM/command line flash have had issues. I think it is a case of some strings needing escape or quoting which isn’t present. What do you see on your host PC for:

echo $LANG

Note that not every non-en_US character or string will have problems even if not en_US.

Is there anything at all which is “non-standard” about your Ubuntu host, e.g., using an alternate GUI?

Hi linuxdev @linuxdev, I have found that the problem.
Firstly, I installed ubuntu18.04 instead of my previous ubuntu16.4, and it could use sdkmanager.
Then I installed the Anaconda which is used by python.
If I type pip3 in terminal, it would showed as following:

Traceback (most recent call last):
File “/usr/bin/pip3”, line 9, in
from pip import main
ImportError: cannot import name ‘main’ from ‘pip’ (/home/kirito/anaconda3/lib/python3.7/site-packages/pip/init.py)

I followed the way who has solved it as following:

"from pip import main " change to “from pip._internal import main”

If I type “pip3” in terminal, and it would show like this:

ine 1012, in _lsb_release_info
stdout = subprocess.check_output(cmd, stderr=devnull)
File “/home/kirito/anaconda3/lib/python3.7/subprocess.py”, line 395, in check_output
**kwargs).stdout
File “/home/kirito/anaconda3/lib/python3.7/subprocess.py”, line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.

Then I followed the way who has solved it as following:

sudo rm /usr/bin/lsb_release

Even though I could use pip3 , the sdkmanager would show “/bin/sh: 1: lsb_release: not found” again

And I install python-pip in terminal and copy the right lsb_release from other computer to /usr/bin/.
Then edit from #!/usr/bin/python3 -Es to #!/usr/bin/python.
Now it can open sdkmanager and use pip3 successfully.

Anyway, it shows that when other meet this problem, he can check whether or not to delete lsb_release in /usr/bin/lsb_release

After installing pip3, you may have to rehash with

hash -r pip

or reboot.