After fresh install: diff not found

After fresh install of 19.10 apt-get yells “diff not found”. “diffutils” are installed, reinstall fails - due to missing diff(!) - sorry for German language version:

$ sudo apt-get reinstall diffutils
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 203 nicht aktualisiert.
Es müssen noch 0 B von 200 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
dpkg: Warnung: »diff« wurde im PATH nicht gefunden oder ist nicht ausführbar
dpkg: Fehler: 1 erwartetes Programm nicht im PATH gefunden oder nicht ausführbar
Beachten Sie: PATH von root sollte normalerweise /usr/local/sbin, /usr/sbin und /sbin enthalten
E: Sub-process /usr/bin/dpkg returned an error code (2)

$ whereis diff
diff: /usr/share/man/man1/diff.1.gz

Any idea? (same request in German

Can’t reproduce. I just did a fresh install. First, diffutils comes standard with Lubuntu 19.10. Secondly, both whereis and which find /usr/bin/diff. I can only imagine the problem is related to something you have done.

@wxl: Thank you for your answer. Might not be a problem with something I have done, but with something I have…

After a hint in the German discussion, I repeated the installation, and received an installation failure (see snapshot), also indicating missing diff.

Ubuntu Mate installation also fails, however with a message indicating some hardware problem. (see snapshot)

Upon booting the live image before install, did you run the “Check disc for defects?”

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.

Problem solved - or rather: disappeared - and was most certainly related to the hardware:

After Ubuntu MATE installation had also failed, I started the SMART Self-Test from the live system. The test got me no error message, however, after that Lubuntu installed with no more error (with the same medium that previously had twice failed).

Thanks to all for your time - and stay healthy!

I still suspect a problem with the installation media. Weird problems like this don’t occur otherwise. To be clear, that check I mention does not check the state of the hard drive (therefore SMART is irrelevant), but it checks the state of the media you’re using to install. You can have errors due to download errors and errors due to copy errors. Either way, even if it’s one bit of difference, it could lead to all sorts of problems. It may be you will find some other problem lurking about later. You might want to make sure you have a valid install before using that install in production.

@wxl: Thank you for your answer again - no, I did not run “Check disc for defects”. And unfortunately, the installation media in the meantime has been reformatted and is in use otherwise - so there is no way to run the check, anymore.

However, for next time: Where would I find this check? (And would it make sense to include it into the Lubuntu install procedure, in particular into the error message window?)

Well, just keep in mind if you have some strange, inexplicable issue that no one else has, that is likely your problem. Should you encounter another problem like the one you experienced, I would suggest doing an apt install --reinstall of every package involved.

The check is at the boot menu. There’s also a memory check option. For 20.04 and on, it will automatically run, so your good idea has already been implemented. :slight_smile: