ClamAV error: cannot open libclamav.so.9 (Solved )

Moderator: fredx181

Post Reply
User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

ClamAV error: cannot open libclamav.so.9 (Solved )

Post by soniabu »

Hello everybody.
I embarked on the installation of the Clamav antivirus.
The installation seems to have gone well; but as soon as I try to update the database I get this error that I can't solve even looking on the net.
I join you the images of my PC from which you can (I hope) understand more than I can do.
If anyone has a suggestion I will be grateful to them. Sonia
P.S. In this forum https://forum.terra-master.com/en/viewtopic.php?p=11798
it seems that the problem is common to many users and comes from Clamav.

Image

Image

Image

Image

Last edited by soniabu on Mon Aug 16, 2021 4:22 pm, edited 2 times in total.
User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error

Post by fredx181 »

Hi Sonia, obviously (looking at your screenshots) libclamav9 is installed, so TBH I have no idea why the lib can't be found, sorry.
Btw, no need to use "sudo" as you are logged in as "superuser" "root".

Fred

User avatar
rcrsn51
Posts: 1383
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: ClamAV error

Post by rcrsn51 »

Go into the directory /usr/lib/x86_64-linux-gnu.
Locate the file libclamav.so.9
Does it point correctly to libclamav.so.9.0.5 or is it a broken link?

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error

Post by soniabu »

here it is, what do you think?
Image

Image

Image

User avatar
rcrsn51
Posts: 1383
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: ClamAV error

Post by rcrsn51 »

Your first screen shot does not show the file libclamav.so.9.0.5. Is it in the next column to the right?

Run: ldd libclamav.so.9.0.5

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: ClamAV error

Post by williams2 »

You could try copying or moving the /usr/lib/x86_64-linux-gnu/libclamav.so.9* files to /usr/lib/

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error

Post by soniabu »

rcrsn51 wrote: Thu Aug 12, 2021 4:29 pm

Go into the directory /usr/lib/x86_64-linux-gnu.
Locate the file libclamav.so.9
Does it point correctly to libclamav.so.9.0.5 or is it a broken link?

Image

Image

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error

Post by soniabu »

williams2 wrote: Thu Aug 12, 2021 7:14 pm

You could try copying or moving the /usr/lib/x86_64-linux-gnu/libclamav.so.9* files to /usr/lib/

Williams, I copied in usr/lib and now informs me:

Image

User avatar
rcrsn51
Posts: 1383
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: ClamAV error

Post by rcrsn51 »

Are you running as an unprivileged user?

Try: chmod 755 /usr/lib

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error

Post by soniabu »

i'm as root and anyway i gave the command chmod 777 / usr / lib
Image

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: ClamAV err libclamav.so.9.0.5or

Post by williams2 »

i gave the command chmod 777 / usr / lib

I think the permissions of the file /usr/lib/libclamav.so.9.0.5 need to be set. Like:

chmod 755 /usr/lib/libclamav.so.9.0.5

I think clamav does not run as root, I think it runs as user clamav, group clamav.

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error

Post by fredx181 »

Hello Sonia, I tested installing clamav on a pristine FossaDog install now.

Code: Select all

root@live:~# freshclam
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
root@live:~# killall freshclam
root@live:~# freshclam
Fri Aug 13 10:33:32 2021 -> ClamAV update process started at Fri Aug 13 10:33:32 2021
Fri Aug 13 10:33:32 2021 -> ^Your ClamAV installation is OUTDATED!
Fri Aug 13 10:33:32 2021 -> ^Local version: 0.102.2 Recommended version: 0.103.3
Fri Aug 13 10:33:32 2021 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Fri Aug 13 10:33:32 2021 -> daily.cvd database is up to date (version: 26261, sigs: 1967776, f-level: 90, builder: raynman)
Fri Aug 13 10:33:33 2021 -> main.cvd database is up to date (version: 61, sigs: 6607162, f-level: 90, builder: sigmgr)
Fri Aug 13 10:33:33 2021 -> bytecode.cvd database is up to date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
root@live:~# 

As you can see above there was a problem with the log file, so I did killall freshclam and then it appeared to work (except for the OUTDATED message).
No problem I got with libclamav.so.9, like you, so I have no idea what's wrong at your end.

Btw, I also installed "clamtk", a GUI for clamav, more convenient, seems to work well for scanning file/directory.

Fred

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error

Post by soniabu »

no valid result does not scan
Image

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV err libclamav.so.9.0.5or

Post by soniabu »

williams2 wrote: Thu Aug 12, 2021 10:03 pm

i gave the command chmod 777 / usr / lib

I think the permissions of the file /usr/lib/libclamav.so.9.0.5 need to be set. Like:

chmod 755 /usr/lib/libclamav.so.9.0.5

I think clamav does not run as root, I think it runs as user clamav, group clamav.

Will, I tried to create the user but he replies that it already exists but I can't use it ...
Image

Image

Image

Image

Image

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error

Post by fredx181 »

Sonia, I don't think it needs to run as user clamav (it works for me running as root).
The problem apparently still is that it cannot find libclamav.so.9 (perhaps run clamtk from terminal to possibly see errors).

If I remember well you reported some (strange!) problems earlier (that I couldn't reproduce either with a clean FossaDog install), it could be that something went wrong in your save storage, if I were you I'd start all over with a fresh save, (there's a good chance that your problems are gone then).

Fred

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error

Post by soniabu »

Fred and all the other friends,
I managed to re installing clamav again and since the freshclam command still signaled me that it was impossible to open libclamav.so.9, I downloaded the database signatures from here: https://database.clamav.net/daily .cvd then I continued - as shown in the images - the installation and finally performed the scan.
Anyways for now it went like this. :roll:
thank you all
sonia

Image

Image

Image

User avatar
Flash
Moderator
Posts: 974
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 125 times

Re: ClamAV error: cannot open libclamav.so.9

Post by Flash »

So your problem is solved?

Chaos coordinator :?
User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error: cannot open libclamav.so.9

Post by fredx181 »

Flash wrote: Fri Aug 13, 2021 4:40 pm

So your problem is solved?

Probably not really because the libclamav.so.9 error is still there, but of course Sonia can better speak for herself.

@soniabu I invite you to try FossaDog with a new save storage (or run without save, i.e. temporary remove the "changes=..." from the boot command line) just for the sake of testing, install clamav then and (I expect) there will be no errors (and if so then it indicates that something went wrong probably with your original save storage).

Fred

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error: cannot open libclamav.so.9 (Solved So, So)

Post by soniabu »

okay Fred, as soon as I understand how to do what you suggest I'll do it promptly.
s

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error: cannot open libclamav.so.9 (Solved So, So)

Post by fredx181 »

soniabu wrote: Fri Aug 13, 2021 7:45 pm

okay Fred, as soon as I understand how to do what you suggest I'll do it promptly.
s

Probably I can help, but if you're fine with how it is, I don't have intention to force you.
Anyway, how did you install Fossadog, which bootloader used? E.g. grub4dos, syslinux, GRUB2 or... ?
In any case you should have some menu entry containing "changes=...", (please provide details) just remove that part and you will boot in pristine state.
Or modify "changes=..." to point to another location for the save storage.

Fred

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error: cannot open libclamav.so.9 (Solved So, So)

Post by soniabu »

Fred,
I asked my little sister (by phone) to run the clamav test by running the OS as default and
from the result it seems that there is something wrong in my sw :roll: .
I join you the image of the result.
sonia

Image

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error: cannot open libclamav.so.9 (Solved So, So)

Post by fredx181 »

soniabu wrote: Sun Aug 15, 2021 9:21 am

Fred,
I asked my little sister (by phone) to run the clamav test by running the OS as default and
from the result it seems that there is something wrong in my sw :roll: .
I join you the image of the result.
sonia

Okay, no error about libclamav.so.9 showing anymore, I assume this is Fossadog without save ? (or new save)
If so, yes, as I expected, there's probably something wrong with your original save (perhaps permissions issue?, don't know), if you continue using it, there's a risk that more problems will occur.
So... as I said earlier, better start from scratch with a fresh save.
Good luck!

Fred

User avatar
soniabu
Posts: 278
Joined: Fri Jul 24, 2020 6:14 pm
Location: Paris<-->Montreal
Has thanked: 123 times
Been thanked: 32 times

Re: ClamAV error: cannot open libclamav.so.9 (Solved So, So)

Post by soniabu »

fredx181 wrote: Sun Aug 15, 2021 4:34 pm
soniabu wrote: Sun Aug 15, 2021 9:21 am

Fred,
I asked my little sister (by phone) to run the clamav test by running the OS as default and
from the result it seems that there is something wrong in my sw :roll: .
I join you the image of the result.
sonia

Okay, no error about libclamav.so.9 showing anymore, I assume this is Fossadog without save ? (or new save)
If so, yes, as I expected, there's probably something wrong with your original save (perhaps permissions issue?, don't know), if you continue using it, there's a risk that more problems will occur.
So... as I said earlier, better start from scratch with a fresh save.
Good luck!

Fred

yes Fred, FossaDog without save.
yes, i should start again with S.O. fresh.
I'll see how to do it when I get home.
From this experience I have learned: next time before I resort to your help
I will run a test on a fresh system.
thk again Fred. Sonia

User avatar
fredx181
Posts: 3043
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 369 times
Been thanked: 1293 times
Contact:

Re: ClamAV error: cannot open libclamav.so.9 (Solved So, So)

Post by fredx181 »

soniabu wrote:

From this experience I have learned: next time before I resort to your help
I will run a test on a fresh system.

I guess that's not needed.
Let's assume that it will be fine (and remain fine) after you've setup a new save.

EDIT: Oh, and I'd advice to use the latest version:
https://debiandog.github.io/doglinux/zz04fossadog.html
(FossaDog-2020-11-15_64-bit-UEFI.iso with kernel 5.4.0-53-generic)

Post Reply

Return to “UbuntuDogs”