NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Building IPK on PXI with Linux RT

Solved!
Go to solution

I suggested installing the xinetd-dev package, not xinetd. The dev package is what was in the log as causing an issue. At this point I think the whole thing is a bit mucked up and I'm not really sure the best way to back out of it. 

 

Can you check the list of installed packages for the packages it's referring to, then remove each one? After that, generate a log again and let's see what it says.

 

Otherwise, it might just be faster to format and start over. I'm not sure how the system got into this state and the whole thing is very strange to me. I'm by no means an expert on how opkg manages each package internally but I've never seen something stuck as marked for installation after the install failed. 

Charlie J.
National Instruments
0 Kudos
Message 21 of 25
(1,032 Views)

Yes, but xinetd-dev was asking for xinetd_2.3.15-5 which is why I installed that...

 

so that seems to have fixed the error with the install of the hellopkg_1.0.0_x64.ipk giving me an error looking for xinetd

 

trying to install xinetd-dev - is also asking for initscripts-dev

 

ugh - really rather not start over again, but I guess I can look into it.  I did create a dd backup image of the drive before I started mucking around trying to install xinetd and hellopkg - so I guess I can leverage that.  I will try to either install xinetd-dev again and the missing initscripts-dev and see where that gets me, and if it looks like it isn't going to end well, I will revert to my image.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 22 of 25
(1,027 Views)
Solution
Accepted by topic author RVallieu

ok - looking over the options for additional commands on opkg, I noticed a --force-reinstall option and decided to try that out.

 

Doing so provided a little extra context, and maybe the weekend away helped too.  The files I downloaded that appeared to be missing, such as initscripts-dev when I tried to install hellopkg were in a folder that was not the normal download folder.

 

With the --force-reinstall option - I was being told that the files I was trying to install were attempting to be downloaded to that location and the download failed, which makes sense since my system is offline.  I think copied all the files referenced into the normal location:  /etc/opt/ni/2019.1/

 

Then ran the install again and this time it even went and upgraded xinetd with the initscripts-dev install.

 

I was then able to navigate pack to my /etc/opt/external/helloworld/ folder and successfully run opkg install hellopkg_1.0.0_x64.ipk with no install issues

 

Below is the terminal progression for traceability:

 

bash-4.4# pwd
/etc/opt/ni/2019.1
bash-4.4# opkg install --force-reinstall initscripts-dev

Downloading file:///etc/opt/ni/2019.1/initscripts-dev_1.0-r155.44_core2-64.ipk

Collected errors:
* opkg_download_file: ///etc/opt/ni/2019.1/initscripts-dev_1.0-r155.44_core2-64.ipk: No such file.
* opkg_install_pkg: Failed to download initscripts-dev. Perhaps you need to run 'opkg update'?

 

I copied the downloaded initscripts-dev_1.0-r155.44_core2-64.ipk file to /etc/opt/ni/2019.1 and performed the command again:

 

bash-4.4# opkg install --force-reinstall initscripts-dev

Downloading file:///etc/opt/ni/2019.1/initscripts-dev_1.0-r155.44_core2-64.ipk.
Installing initscripts-dev (1.0) on root
Upgrading xinetd from 2.3.15-5 to 2.3.15 on root
Downloading file:///etc/opt/ni/2019.1/xinetd_2.3.15-r2.154_core2-64.ipk.
Configuring initscripts-dev.
Collected errors:
* opkg_download_file: ///etc/opt/ni/2019.1/xinetd_2.3.15-r2.154_core2-64.ipk: No such file.
* opkg_install_pkg: Failed to download xinetd. Perhaps you need to run 'opkg update'?

 

I had this file in my download folder, and copied it over to /etc/opt/ni/2019.1 and ran the command again

 

bash-4.4# opkg install --force-reinstall initscripts-dev
Downloading file:///etc/opt/ni/2019.1/initscripts-dev_1.0-r155.44_core2-64.ipk.
Installing initscripts-dev (1.0) on root
Upgrading xinetd from 2.3.15-5 to 2.3.15 on root
Downloading file:///etc/opt/ni/2019.1/xinetd_2.3.15-r2.154_core2-64.ipk.
/bin/sh: /etc/rc.common: No such file or directory
update-rc.d: /etc/init.d/xinetd exists during rc.d purge (continuing)
Removing any system startup links for xinetd ...
Removing obsolete file /lib/upgrade/keep.d/xinetd.
Installing xinetd-dev (2.3.15) on root
Downloading file:///etc/opt/ni/2019.1/xinetd-dev_2.3.15-r2.154_core2-64.ipk.
Configuring initscripts-dev.
Configuring xinetd.
Adding system startup for /etc/init.d/xinetd.
Starting internet superserver: xinetd.
Collected errors:
* opkg_download_file: ///etc/opt/ni/2019.1/xinetd-dev_2.3.15-r2.154_core2-64.ipk: No such file.
* opkg_install_pkg: Failed to download xinetd-dev. Perhaps you need to run 'opkg update'?

 

I had this file downloaded as well, and copied it over to /etc/opt/ni/2019.1/ and ran the command again.

 

bash-4.4# opkg install --force-reinstall initscripts-dev
Downloading file:///etc/opt/ni/2019.1/initscripts-dev_1.0-r155.44_core2-64.ipk.
Installing initscripts-dev (1.0) on root
Installing xinetd-dev (2.3.15) on root
Downloading file:///etc/opt/ni/2019.1/xinetd-dev_2.3.15-r2.154_core2-64.ipk.
Configuring initscripts-dev.
Configuring xinetd-dev.

 

This time it installed!  I then made sure it was installed:

 

bash-4.4# opkg info initscripts-dev
Package: initscripts-dev
Version: 1.0-r155.44
Depends: initscripts (= 1.0-r155.44)
Recommends: initd-functions-dev, initscripts-sushell-dev
Status: install ok installed
Section: devel
Architecture: core2-64
Maintainer: NI Linux Real-Time Maintainers <nilrt@ni.com>
MD5Sum: 2ca33d6a0082b6a85cd931b12f8e187e
Size: 964
Filename: initscripts-dev_1.0-r155.44_core2-64.ipk
Source: initscripts_1.0.bb
Description: SysV init scripts - Development files
Initscripts provide the basic system startup initialization scripts for
the system. These scripts include actions such as filesystem mounting,
fsck, RTC manipulation and other actions routinely performed at system
startup. In addition, the scripts are also used during system shutdown
to reverse the actions performed at startup. This package contains
symbolic links, header files, and related items necessary for software
development.
Installed-Time: 1584385692
License: GPLv2
OE: initscripts
Homepage: https://github.com/fedora-sysv/initscripts

 

I then navigated back to my helloworld folder and installed Hellopkg_1.0.0_x64.ipk and that worked with no issue and installed  /usr/bin/hello and I was able to run ./hello in /usr/bin and got the expected Hello World!!!

 

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 23 of 25
(1,000 Views)

Glad to hear you sorted it out! If you figure out how the system got into that state in the first place, please let us know. It probably warrants some further investigation if it's easily reproducible. 

Charlie J.
National Instruments
0 Kudos
Message 24 of 25
(996 Views)

The only thing I can think of is that I tried to install the xinetd packages - and not the correct one from NI originally.

 

Then when I did get the correct xinetd files the normal verbosity of the install didn't show the required dependent files for an offline machine.

 

Thanks for your help in the matter, it was good to know that my ipk was able to be installed independently.

 

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 25 of 25
(988 Views)