ProLiant Servers (ML,DL,SL)

Reinstalling amsd on DL360 Gen10 running Ubuntu 18.04

 
SOLVED
Go to solution
MidOfa
Regular Visitor

Reinstalling amsd on DL360 Gen10 running Ubuntu 18.04

I'm trying to install amsd on a DL360 Gen10 running Ubuntu 18.04. I have two related issues.

I wanted to create a bond with two of the NICs. I configured it in /etc/netplan/50-cloud-init.yaml. When I was doing that I deleted a virtual NIC that I now believe may have been used by amsd.

I'm now trying to recreate that virtual NIC but don't know how.

I'm also trying to reinstall amsd to see if that fixes the problem but I'm getting the following error.

 

Preparing to unpack .../amsd_2.1.1-1416.2ubuntu18_amd64.deb ...
Device "30" does not exist.
/var/lib/dpkg/tmp.ci/preinst: 25: /var/lib/dpkg/tmp.ci/preinst: ifup: not found
dpkg: error processing archive /var/cache/apt/archives/amsd_2.1.1-1416.2ubuntu18_amd64.deb (--unpack):
new amsd package pre-installation script subprocess returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/amsd_2.1.1-1416.2ubuntu18_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

 I've done a lot of troubleshotting round the errors, "E: Sub-process /usr/bin/dpkg returned an error code (1)" and "package pre-installation script subprocess returned error exit status 127" but nothing is working.

Thanks for your help.

3 REPLIES 3
SanjeevGoyal
HPE Pro
Solution

Re: Reinstalling amsd on DL360 Gen10 running Ubuntu 18.04

Hello,

According to the following error message :

"subprocess installed post-installation script returned error exit status 127"

You may want to edit /var/lib/dpkg/info/[package_name].postinst and comment everything (or better yet, try to understand it and identify the issue), then try apt-get again.

Note that though in this particular question the message concerns "post-installation", it could have mentioned e.g. "pre-removal" or "post-removal" instead (in which cases the extension of the file to be edited would have been .prerm or .postrm).

Actually, this is the best method. Reinstalling dpkg doesn't always help

Try the below command:

to fix  /var/lib/dpkg/info/[package_name].prerm

If you feel this was helpful please click the KUDOS! thumb below!   

Regards,


I am a HPE Employee

Accept or Kudo

MidOfa
Regular Visitor

Re: Reinstalling amsd on DL360 Gen10 running Ubuntu 18.04

Thanks for your help.

I had previously tried what you reccomended but the package was missing from that directory.

Yesterday my coworker whent into the iLO backend and basically toggled the NIC off and then on (we did this before to no avail). Today after reading your post I tired to install the package one more time and it worked.

QMeister
Collector

Re: Reinstalling amsd on DL360 Gen10 running Ubuntu 18.04

Your solution didn't work for me. In my case it didn't work because the interfaces where part of a network bond.
However here is another workround to modify the install package:

Create temporary directory:

mkdir /tmp/packagetemp

Extract the cached deb package:

dpkg-deb -R /var/cache/apt/archives/amsd_2.4.1-1571.9-debian10_amd64.deb /tmp/packagetemp

Edit the preinstall script:

vi DEBIAN/preinst

On line 727 replace the NIC variable to the one you have, for example:

#NIC=`ls -l /sys/class/net|grep usb|sed "s/ / /"|cut -f9 -d\ `
NIC="bond0"

Rebuild the deb package:

dpkg-deb -b /tmp/packagetemp amsd_2.4.1-1571.9-debian10_amd64_fixed.deb

Install the modified package:

dpkg -i /tmp/packagetemp/amsd_2.4.1-1571.9-debian10_amd64_fixed.deb

Grab a beer and relax.