Tag Archives: Debian Squeeze

First download, build and install clamav. I found that Debian Squeeze’s clamav in the apt package was not detected by the php-clamav installation script.

So:

wget http://downloads.sourceforge.net/clamav/clamav-0.97.6.tar.gz
tar -xvvf clamav-0.97.6.tar.gz
cd clamav-0.97.6
./configure
make
make install

Now download , build and install php-clamav

wget http://nchc.dl.sourceforge.net/project/php-clamav/0.15/php-clamav_0.15.7.tar.gz
tar -xvvf php-clamav_0.15.7.tar.gz
cd php-clamav-0.15.7/
phpize
./configure --with-clamav
make
make install

Once installed, you need to enable php-clamav.

First edit the clamav configuration file:

emacs /usr/local/etc/clamd.conf

Read the file and set your options. At the bare minimum, you need to comment out this line:

Example

So it reads this:

#Example

Now run clamscan and test that it works:

[[email protected]] /etc/php5/conf.d #clamdscan -V
ClamAV 0.97.6

If there’s an issue with the configuration, at this point it will notify you to correct it. If everything is alright, it will report the version.

Now you need to setup so that clamav php extension loads up whenever the web server is loaded.

Create a new text file in /etc/php5/conf.d/clamav.ini with the following content:

extension=clamav.so

Now restart apache2 on the webserver and load a php file with the function phpinfo (assuming it is enabled on your server of course). You can confirm that the extension is loaded by the fact that phpinfo reports a whole new section for clamav (Just use the search option on the page).

Remarks: Note the following procedure seemed to corrupt dependencies for my kernel to a point where it was easier to reinstall the OS than remove conflicting packages and install correct ones. 

Add a new repository to apt sources:

Create a new file in sources.list.d

kdesudo kate /etc/apt/sources.list.d/libre-office.list

Add this line:

deb http://backports.debian.org/debian-backports squeeze-backports main

Running command:

[[email protected] c]$ sudo apt-get install libreoffice

 

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libreoffice : Depends: libreoffice-core (= 1:3.5.4+dfsg-3~bpo60+2) but it is not going to be installed
Depends: libreoffice-writer but it is not going to be installed
Depends: libreoffice-calc but it is not going to be installed
Depends: libreoffice-impress but it is not going to be installed
Depends: libreoffice-draw but it is not going to be installed
Depends: libreoffice-math but it is not going to be installed
Depends: libreoffice-base but it is not going to be installed
Depends: libreoffice-report-builder-bin but it is not going to be installed
Depends: libreoffice-filter-mobiledev but it is not going to be installed
Depends: libreoffice-java-common (>= 1:3.5.4+dfsg~) but it is not going to be installed
E: Broken packages

 

The dependency problems seemed difficult to fix, so I tried:

[[email protected] c]$ sudo aptitude -t squeeze-backports install libreoffice