Squidclamav not installing


I just installed ipfire core 163 on my CM4 8GB version. Everything seemed to be fine so I started to install several addons. However I can’t install squidclamav. Everytime I try to install it, the job router quits as usuall but it’s still listed in available addons and not listed in installed addons. Even there is the checkbox in web proxy settings to enable/disable squidclamav, it does not show up in services. What’s going on?


I just created a CU163 clone on my testbed and ran pakfire on it with squidclamav selected. It add clamav as a dependency, I said go ahead and it installed both of them successfully. Clamav also shows up as running on my services tab.

What error messages do you get in your pakfire log after having the problem trying to install squidclamav?

If the checkbox for squidclamav is present then the install process for squidclamav must have worked. The proxy.cgi page for the web proxy only shows the enable checkbox if it finds /usr/bin/squidclamav is present on the IPFire system.

You won’t find squidclamav on the services screen, only clamav. clamav is the daemon service. squidclamav is a redirector that connects together the clamav daemon and the squid web proxy.

So it sounds to me that squidclamav was installed.

Did you try to refresh the menu page after the addon install was completed. After install my installed list included both clamav and squidclamav but maybe the screen got stuck on its previous status. Just reselecting the pakfir menu will refresh the screen.

Is it only the squidclamav addon that is not listed as installed or is it also the clamav addon?

Clamav is installed and active. Squid is still listed in available addons so it’s not a webpage cache problem.

If I run the installer on a console I get:

[root@MM-FW-003 ~]# pakfire install squidclamav
PAKFIRE RESV: squidclamav: Resolving dependencies...
PAKFIRE RESV: squidclamav: Dependency is already installed: clamav

PAKFIRE INFO: Packages to install:
PAKFIRE INFO: squidclamav        - 30.00 KB

PAKFIRE INFO: Total size:        ~ 30.00 KB

PAKFIRE INFO: Is this okay? [y/N]

PAKFIRE INST: squidclamav: Decrypting...
PAKFIRE INST: squidclamav: Copying files and running post-installation scripts..                   .
PAKFIRE ERROR: Returncode: 2. Sorry. Please search our forum to find a solution                    for this problem.
[root@MM-FW-003 ~]#

I had a search through the code and the message

is in the functions.pl file. It is the error code when running the install.sh script for the addon has a failure.

The script extracts the files into a tmp directory and if the returncode is zero moves them into the defined locations and that is where the returncode of 2 has come indicating a problem.

Searching on the forum I found a thread about Returncode 2 indicating a problem with insufficient disk space.

If that is a problem for you then that will be seen in the ipfire log section. You should also see it in your media information page. This could be a problem if you have the old partition format that had a separate partition for / and for /var. That was changed in 2018 into a single / partition that also included /var but of course running systems can not have their partition structures changed. The old system had approx 2G partition for / and as the system code has increased this partition has become more and more full. Any addons installed would go into the / partition.

1 Like

When I woke up this morning I remembered that you had just installed ipfire so the old partition structure can’t be a problem and your media screenshot confirms that.

I can’t think why that step in functions.pl of extracting to a tmpdir is giving a problem.

If you try and manually install another addon, like iperf3 does that go successfully or also fail with the same message?

Let’s see how far through installing it got. Which of the following files exist on your system and which don’t?


I suspect that the db/installed and db/meta lines won’t exist as those are what are used to remove the entry from the available box and show it in the installed box. I also expect the /usr/bin/squidclamav file to be present as you have the squidclamav checkbox available on your web proxy page. This will also confirm if I have read the code and experimented correctly.

The status of the other files presence will give a clue how far through the install got before it hit the error.

The last command in squidclamav install skript is
/etc/init.d/squid restart

If this fails you get this error.








I reinstalled ipfire (this time on the emmc) and restored the backup and tried to install it. Got the same result. I deleted the listed files and tried again. No change.

I found out the problem and could install the addon. There must be a bug when restoring a backup and try to install the addon. I just unchecked the checkbox in webproxy and restarted the proxy. Afterwards I was able to install the addon.

I thought if that is a bug then it needs to be sorted out. So I tried to duplicate the problem as you described it but I had no problem with installing squidclamav after restoring my backup.
In case I didn’t actually duplicate your sequence of events, here are the steps I did. Please let me know if there is a difference between what I did and what you did.

I setup a vm IPFire clone running CU163. This already had the Web Proxy running. I then installed clamav and squidclamav using the wui pakfire. This was successfully completed. I then clicked the squidclamav enabled box on the web proxy page.
Then I did a backup of IPFire and of squidclamav and saved them offline from the vm machine.

Then I did a complete fresh install of IPFire CU163 into the IPFire vm, all with the same IP addresses for all of the zones (red, green, blue and orange).

Then I browsed to the main backup file that I had saved and imported it. Everything was updated as it should be but without any squidclamav enabled checkbox on the web proxy page.

Then I installed clamav and squidclamav via the wui pakfire interface and both were successfully downloaded without any issues.

Then I was able to check the squidclamav enabled box and pressed Save and Restart for the Web Proxy. No errors or issues.

Then I restored the squidclamav backup file. No errors or issues.

I suspect that somewhere during your first install some hiccup happened causing squidclamav to end up in a partially installed state where some of the files were present and some not. Crucially you had the squidclamav binary and hence the web proxy wui page had the squidclamav enabled checkbox available. The file was not in the installed directory so as far as pakfire was concerned the addon was not installed but maybe having the wui squidclamav checkbox checked when trying to do the install creates a problem because it should not be there or not enabled when squidclamav is trying to be installed

Anyway, I am glad to you got your system sorted out in the end and have squidclamav correctly installed now.

I installed ipfire and restored the backup (offline). I got it online as usuall. Afterwards I was not able to install squidclamav. All other addons I use were installed without any problems. That is all I did and I tried it twice.

I realized the active checkbox coincidentally and turned it off. Retried again and it worked. If that is not a bug it must be a service.

If I understand right after installing ipfire and restoring the main ipfire backup you ended up with a web proxy page that had the squidclamav checkbox present and checked before you had even installed squidclamav. Is that correct?

That is what I have not been able to reproduce.

I installed ipfire, restored the main backup and had a web proxy page that only had the url filter and update accelerator checkboxes present.

Yes. At least I guess so because I haven’t checked the webproxy settings before I tried to install squidclamav for the first time. So it is still possible that it ended up like that after I tried to install squidclamav, that actually failed. However even if you install squidclamav you have to activate the checkbox manually. So some setting is restored that does that (activates the plugin), but is not intended to do that because it results in a malfunction (because of missing files).