Error installing: tftpd

Running OSMC on a Raspberry Pi (V2). Just rebooted after long time and it suggested upgrades. I said yes to the upgrade and get the message “OSMC Update Error” in the upper left side of the screen and “Error installing: tftpd”

I do not connect to OSMC with tftp so this is not a problem for me on that front, but the screen said “Please report this on the OSMC forum”, so I am reporting in appreciation for all the hard work of the Dev team.

If I click OK I get the graphic screen and functionality.

If I reboot I get the same message.

If I ssh into the pi and try to reinstall tftpd I get this:

osmc@osmc:~$ sudo apt-get install tftpd

Reading package lists… Done

Building dependency tree

Reading state information… Done

tftpd is already the newest version (0.17-18+b2).

The following package was automatically installed and is no longer required:

rbp2-image-4.14.34-6-osmc

Use ‘sudo apt autoremove’ to remove it.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

Do you want to continue? [Y/n] y

Setting up tftpd (0.17-18+b2) …

/var/lib/dpkg/info/tftpd.postinst: 9: /var/lib/dpkg/info/tftpd.postinst: update-inetd: not found

dpkg: error processing package tftpd (–configure):

subprocess installed post-installation script returned error exit status 127

Errors were encountered while processing:

tftpd

E: Sub-process /usr/bin/dpkg returned an error code (1)

================================
The line generating the message i.e. tfpt.postinst:9 is:

update-inetd --group BOOT --add “tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp”
;;

================================
Sure enough /usr/sbin/tcpd and /srv/tftp are missing
and /usr/sbin/in.tftpd exists.

I do not understand update-inetd

Provide URL of paste-logs /var/lib/dpkg/info/tftpd.postinst

It’s possible that the tftpd package didn’t download correctly.

You can remove the downloaded package and try a reinstall:

sudo apt-get clean
sudo apt-get install --reinstall tftpd

sudo apt-get clean
completes with no output

osmc@osmc:~$ sudo apt-get install --reinstall tftpd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for tftpd:armhf

==============

fzinken - not sure if this is what you are asking for but here is the URL of a paste of /var/lib/dpkg/info/tftpd.postinst

https://pastebin.com/72d1vN6R

I’m guessing that you haven’t yet run sudo apt-get update to get a list of the latest packages.

If correct, run the above command and then repeat sudo apt-get install --reinstall tftpd

If that fails, please post full logs: grab-logs -A

Actually the error started after an osmc initiatied update triggered by a reboot. But i did another one just to be sure. I followed the onscreen advice and did:

sudo apt-get dist-upgrade

got the same error message

result is:
https://paste.osmc.tv/ikiwacetaf

The solution for me was:

apt-get install update-inetd

I guess that should have been obvious to me from my first post.

When I did the reinstall of tftpd I got this note at the end suggesting that update-inetd is outdated??

Note: xinetd currently is not fully supported by update-inetd. Please consult /usr/share/doc/xinetd/README.Debian and itox(8).

That note suggests a complex interaction of inetd and xinetd. Is it possible that somehow update-inetd was omitted from the latest install. Or conversely that everything else has been moved away from update-inetd to xinetd and tftpd did not get the message?

Hi,

If every thing is working ok, I wouldn’ worry to much about this message. xinetd is an extension of inetd, its pretty stable now; I think the message is still there just a precaution.

Thanks Tom.

Indeed, there seems to be a problem with tftpd, which clearly requires update-inetd when running the tftpd.postinst step but update-inetd is not listed as a direct dependency:

osmc@osmc-4k:~$ apt-cache depends tftpd
tftpd
 |Depends: openbsd-inetd
    openbsd-inetd:arm64
  Depends: <inet-superserver>
    inetutils-inetd
    rlinetd
    xinetd
    openbsd-inetd:arm64
    openbsd-inetd
  Depends: libc6
  Replaces: <netstd>

The strange bit is the second line of the output, |Depends: openbsd-inetd, where the vertical bar is usually used as a logical OR symbol – but in this case it seems that it’s OR-ed with nothing/null, apparently disabling the dependency on openbsd-inetd. The relevance here is that if openbsd-inetd had been installed as a dependency of tftpd, this would, in turn, have pulled in update-inetd. So something seems to be broken.

As described in the file /usr/share/doc/xinetd/README.Debian, xinetd will be looking for its tftpd configuration details in /etc/xinetd.d/tftpd but a quick test suggests that nothing is being written there, and that the tftpd installation relies on writing its config data to /etc/inetd.conf – and fails.

I’m away from home, so can anyone see if openbsd-inetd is installed by default on both the Vero4K and RPi builds of OSMC? (It’s there on my V4K but I might have installed it manually.)

HI,

openbsd-inetd is not installed by default on vero4k, can’t test pi ATM.

Tom.

Thanks Tom. I just downloaded the Pi2/3 and Ver04K/+ images and browsed the files they contain. Neither contains /usr/sbin/inetd or /usr/sbin/update-inetd, so I must have installed the openbsd-inetd package on my Vero4K some time ago.

1 Like