Can't get Smartmontools <Solved>

Follow my recent escapades & while still have my ‘computer head’ on I thought I’d try & check the heath & age of my HDD. Searching I came across Smartmontools command but this had to be installed.

Followed the instruction : $ sudo apt install smartmontools

At the end of the install I had these err, messages:
Err:6 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libmysqlclient20 amd64 5.7.34-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.142 80]
Get:9 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 mailutils amd64 1:3.4-1 [140 kB]
Get:10 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 smartmontools amd64 6.5+svn4324-1ubuntu0.1 [477 kB]
Fetched 2,923 kB in 1s (3,736 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/libmysqlclient20_5.7.34-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I ran ‘apt-update’ then tried --fix-missing. Update updated stuff, ‘fix-missing’ wasn’t recognised.
More searching got me short tutorial on fixing broken/missing packages. did this :

:~$ sudo apt-get update --fix-missing
Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/micahflee/ppa/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists… Done

then:
$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 to upgrade, 0 to newly install, 0 to remove and 10 not to upgrade.

Then I was allegedly read to go so did this (with results):
$ mount | grep ‘on / type’
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
$ sudo smartctl --xall /dev/sda2
sudo: smartctl: command not found

so followed instructions to get rid of any broken/incomplete packages :
$ sudo apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ppa.launchpad.net/micahflee/ppa/ubuntu bionic InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists… Done
$ sudo apt-get clean
$ sudo apt-get autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 to upgrade, 0 to newly install, 0 to remove and 10 not to upgrade.

& finally my question - am I ready to have another go at installing Smartmontools ?

Always update before install :wink:

Try installing it again

sudo apt-get install smartmontools

then on a full disk (not partition)

sudo smartctl -a /dev/sda

Just tried the install command you gave & got this weird **** in a purple edge box replacing the terminal:

Package configuration

--------------------------------------------- Postfix Configuration ---------------------------------------------
| ?
| Please select the mail server configuration type that best meets your
| needs.
|
| No configuration:
| Should be chosen to leave the current configuration unchanged.
| Internet site:
| Mail is sent and received directly using SMTP.
| Internet with smarthost:
| Mail is received directly using SMTP or by running a utility such
| as fetchmail. Outgoing mail is sent using a smarthost.
| Satellite system:
| All mail is sent to another machine, called a ‘smarthost’, for
| delivery.
| Local only:
|
|

?

!?!?!?

Can’t get the terminal back, trying to close the window says there is still a process running in this terminal closing will kill it. Gonna kill it.

Well, you must have installed (or tried to) mailutils (postfix) which after forcing the fix-missing has come to the point of setting itself up ::slight_smile:

It appears that if you got install recommends set then smartmontools will pull in mailutils.

Remove the packages first:

sudo apt-get remove smartmontools
sudo apt-get autoremove

You can test this by:

sudo apt-get install -s smartmontools

To install without the extra packages use this:

sudo apt-get install --no-install-recommends smartmontools

Smartmontools includes a background daemon that will [optionally] periodically monitor your storage devices and attempt to report any problems it finds … via email (!) … so just be aware, if you opt not to install some sort of basic email facility on your machine, you may not get notifications if impending doom should one of you drives start to fail … :wink:

Successfully installed (without recommendations). Thank you (yet again) :slight_smile:

As Mad Penguin pointed out, it is a good idea, having a mailer running on your system to get notifications (by mail) of impending doom. So you may still want to install postfix.
If you are happy that all is well, please mark the title of your first post on this topic as [SOLVED].

Thanks. I’ll bare that in mind for future but as my HDD died yesterday it’s a bit superfluous for the moment. I put a few more details of this on my other thread. Basically old age.