Iperf3 install failed


I recently did a fresh installation of OSMC and decided to have a look at my wifi performance using iperf3. I followed the steps outlined here Here is the result of that process:

osmc@osmc:~$ sudo apt-get install iperf3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libiperf0 libsctp1
Suggested packages:
The following NEW packages will be installed:
  iperf3 libiperf0 libsctp1
0 upgraded, 3 newly installed, 0 to remove and 15 not upgraded.
Need to get 122 kB of archives.
After this operation, 256 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ftp.debian.org/debian buster/main armhf libsctp1 armhf 1.0.18+dfsg-1 [27.6 kB]
Get:2 http://ftp.debian.org/debian buster/main armhf libiperf0 armhf 3.6-2 [69.1 kB]
Get:3 http://ftp.debian.org/debian buster/main armhf iperf3 armhf 3.6-2 [25.5 kB]
Fetched 122 kB in 1s (96.9 kB/s)
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
osmc@osmc:~$ iperf3 -R -c
-bash: iperf3: command not found

Something is evidently missing from my OSMC installation?

Thanks for any help.


Please provide the output of:

echo $PATH


which ldconfig

Thanks Tom.

Thanks Tom.

Here is what I got:

osmc@osmc:~$ echo $PATH
osmc@osmc:~$ which ldconfig
osmc@osmc:~$ which Idconfig

I couldn’t tell if I should type "I (eye)"dconfig or “l(ell)d” config, so I did both.



Your PATH looks ok, but ldconfig (its “l(ell)d”); being missing from the which command is not good. You can double check if it still present with the find command:

find /sbin -name ldconfig

Even if it is I suspect you SD card is failing. I would install to a fresh sd card and restore your settings.

Thanks Tom.

No good:

osmc@osmc:~$ find /sbin -name ldconfig

Well, heck! That card has been sitting in a drawer unused for over 3 years until I loaded a fresh copy of OSMC on it last week! Do they go bad just sitting in a drawer?

I’ll buy a new card and try again.


One quick followup: I use WinSCP to access the Pi. Here is a look at the directory structure in usr/sbin:


Note the question marks in the “Rights” column. I swear I haven’t fiddled around in this directory with WinSCP. I just had a look when bash complained that it couldn’t find ldconfig.



It seems like your SD card may be problematic.

Some SD cards are not genuine or have a lower capacity than advertised. Some simply fail over time.

Symptoms of SD cards not working correctly are:

  • Read-only behaviour, or changes made not persisting
  • A filesystem corruption error

Symptoms of counterfeit SD cards are:

  • Writing works until a certain filesystem size is reached, thereafter, writes seem to cause issues where existing data is lost or newly written data is not preserved.
  • SD card fails after a short amount of time.

Counterfeit cards are usually found on Amazon and eBay.

SD cards have a limited lifespan. I recommend you change SD card and suspect that issues will no longer persist with a good card. If you would like to be a good quality SD card purpose manufactured for OSMC, then you can find one in the Store.

OK. I will get another new card and try again, probably later today. I’ll buy a highly rated card from a local source so I can get it today.

I installed the 2020.10-1 image using the OSMC Windows installer last week. Is there any chance that image was corrupted or the installation process corrupted something? I see there is a checksum posted. Can you point me to a post that shows me how to use that checksum to validate the install if I use the OSMC installer?

Thank you.

1 Like


The checksums are for validating the tar.gz file of the downloaded image, not once its been installed. If the install image was corrupt I would suspect issues to be apparent on first boot, not after a week.

Thanks Tom.

There is a program called h2testw that can test to make sure SD cards are working and not reporting false capacity (aka fake cards). This requires a full write test so imaging the SD card with another program first is required if you want to retain the data it contains. This is a sensible path for both old cards that are suspect and brand new cards.

I bought a new Sandisk card from the local BestBuy so I could address the problems I’m having today. Long story short, I was able to re-install OSMC, install iperf3, and get OSMC configured. All seems good at this point, although acquiring a wireless network connection was quite a fiddly process for me. I’ll report on that separately in case anyone is interested.

The “bad” card I was using up to today is a 32GB PNY “Prime Performance” card. I replaced it with a SanDisk Ultra PLUS 32GB card.

There have been mixed reviews here on the SanDisk cards, so I’ll see what happens. I can’t be sure if the PNY card was bad or if I messed it up by unplugging the Pi to reboot it instead of issuing a sudo poweroff (or equivalent) command from the command line. Lesson learned though, I will not simply unplug to reboot, even if OSMC hangs, unless I can’t reboot from the command line.

For what it’s worth, I had been using a 32GB SanDisk card for the last four years, and I had used the “pull the plug” method to reboot many times, so I guess you could say I’ve had pretty good luck with SanDisk cards.

Thanks very much for the help and advice.

1 Like