NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Python

Hello,

I am trying to get some python scripts to work on my linux target. I found the FAQs that say how to install Python, https://decibel.ni.com/content/docs/DOC-35053. However when I try

opkg install gcc gcc-symlinks

I get the error

 

Unknown package 'gcc'.

Unknown package 'gcc-symlinks'.

Collected errors:

* opkg_install_cmd: Cannot install package gcc.

* opkg_install_cmd: Cannot install package gcc-symlinks.

I am on a work computer, and I know the target cannot access the internet, so I can't use the wget method. Is there another way to install Python on my target?

0 Kudos
Message 1 of 22
(6,103 Views)

Looks like you need "opkg update" first. If you already did that, can you do it again and post the output?

0 Kudos
Message 2 of 22
(4,275 Views)

Doesn't that rely on wget which I can't use since the target cannot connect to the internt?

0 Kudos
Message 3 of 22
(4,275 Views)

If you can't connect to the internet, you're going to need to play courier for the needed packages and manually install them to the target (from USB drive, most likely).

Depending on how frequently you need to install different packages to the target, you may want to consider setting up a local feed server that has access to the internet (and you just script pulling down all of the packages from the NI feed server, essentially acting as a mirror that the target can see)

0 Kudos
Message 4 of 22
(4,275 Views)

I downloaded the .tgz file, but I am still having trouble installing that.

0 Kudos
Message 5 of 22
(4,275 Views)

Which .tgz file? From where? You'd want to use the .ipk files that represent the packages that you are interested in. The Packages.tgz file from the feed, if you're refering to that file, is only a listing of the various packages that are at that feed location, they don't actually include the packages themselves.

0 Kudos
Message 6 of 22
(4,275 Views)

The tgz file from https://www.python.org/downloads/release/python-343/. But I guess that is wrong. Where do I find the .ipk files.

0 Kudos
Message 7 of 22
(4,275 Views)

No, that's fine if you're building python from source.

Basically, opkg install $PACKAGE will, if $PACKAGE is not a file path to a .ipk file, attempt to use its knowledge of what packages are available to download from the configured feeds (opkg update will update the listing of available packages).

Since this target is not able to connect to the internet, you essentially need to download the packages that would be installed when running opkg install gcc gcc-symlinks. I can tell you, from experience, you'll need to also download some additional packages as there are dependencies in these packages (opkg would handle downloading the additional dependencies if it were able to connect to the internet).

What version of RT/RIO are you using?

0 Kudos
Message 8 of 22
(4,275 Views)

I am uisng NI-RIO 14.0.1 and LabVIEW Real-Time 14.0.0.

Is there a reason outside of potentially a firewall keeping the target from the internet?

0 Kudos
Message 9 of 22
(4,275 Views)

What target are you using and, more importantly, what does the network between your target and the Internet look like? I've seen issues in the past where firewalls were (sanely) configured to disallow traffic from wget (many exploits come packaged with a form of wget to download instructions/commands/components).

If the target is *supposed* to be able to download packages from the internet, we may be able to work around that.

0 Kudos
Message 10 of 22
(4,275 Views)