[clamav-users] How to recompile with -fPIC?

albertomatxain at protonmail.com albertomatxain at protonmail.com
Sun Jun 28 21:53:24 UTC 2020


Hi, Ged and Micah.

Thank you for the answers. I've tried following the steps that Ged told me (1. Delete... 2. Extract... 3. Change... 4. Run the following commands...), and I've installed Clamav properly. I've configured clamd.conf and freshclam.conf; I've configured on-access scanning on clamd.conf; I've programmed automatic scans with crontab (clamdscan command); I did a little script to run when a virus event happens (to ask me if I want to delete the virus or move it to a folder), and I created log files for the programmed scans, the database updates, the on-access scanning and the virus events. For me, that's quite enough. :-)

I haven't found any virus on my laptop. Now, I would like to test the virus event on the programmed scans and on-access scanning, to be sure that they work. Can you help me?

Thank you very much.

Alberto


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 2020ko Juneren 19a 14:47, G.W. Haywood via clamav-users <clamav-users at lists.clamav.net> wrote:

> Hi there,
>
> On Fri, 19 Jun 2020, Alberto Matxain wrote:
>
> > I'm trying to install the latest version of clamav (0.102.3) on
> > Ubuntu 20.04. I'm configuring clamav following the steps explained
> > in
> > http://www.clamav.net/documents/installation-on-debian-and-ubuntu-linux-distributions.
>
> To be fair to you, that document isn't exactly beginner-friendly.
>
> > It's the first time that I download the source code and I configure
> > and compile a programme. I'm blocked because I don't know how to
> > recompile with fPIC.
> > ...
> > ./configure --enable-check --disable-clamav --with-libjson-static=/usr/lib/x86_64-linux-gnu/libjson-c.a
> > ...
> > make -j2
> > ...
> > /usr/bin/ld: ... recompile with -fPIC
>
> There are much easier ways to do what you want to do. Version 0.102.3
> of ClamaV is available in an Ubuntu package, so unless you're using an
> architecture for which the package is not available (and I don't
> believe that you are) then you could probably just install that:
>
> https://packages.ubuntu.com/search?keywords=clamav&searchon=names&suite=focal&section=all
>
> Even if you do want to compile it yourself, unless you want to have
> more than one version of ClamAV running on your system (which I don't
> recommend for a beginner), on an ordinary Ubuntu system I wouldn't
> expect you to need any fancy options to 'configure'. In that case I
> would suggest, assuming that you've already installed dependencies:
>
> 1.  Delete your existing clamav-0.102.3 source tree.
> 2.  Extract the tarball once again into a new source tree(*).
> 3.  Change your working directory to the top level of that tree.
> 4.  Run the following comands verbatim - no options at all ():
>     ./configure
>     make
>     sudo make install
>     (*) Do this logged in as your usual user, in your home directory,
>     or somewhere that doesn't neeed administrator permissions to work.
>     () Run these commands as your usual user, not 'root'. The lastcommand could be replaced by 'su root ; make install' which is how
>     I normally do it - but that's just because I have a sudo aversion.
>
>     Please let us know how you get on. FWIW these are more or less the
>     steps to build anything supplied as a source tarball - at least if the
>     source is written largely in C (as is ClamAV). Broadly speaking they
>     (1) set up the source tree to suit your system; (2) compile the source
>     thus set up to produce binaries and stuff in the source tree (but at
>     this stage it's still all in your source tree); and (3) copy the
>     binaries, configuration files etc. (etc.) from the source tree into
>     the appropriate system areas - which is why that last step will need
>     administrator permissions. Sometimes you can run the binaries while
>     they're still in the source tree, and if you do an optional but very
>     common 'make test' step before 'make install' that's what will happen.
>     I rarely bother doing that for ClamAV so I've left that part out for
>     simplicity, as the output might just give you more palpitations.
>
>     After you've done all this you should have ClamAV installed, and you
>     can get back to us to tell us what you want to do with it because it
>     will probably need some work to configure it to your liking. ClamAV
>     is more along the lines of a toolkit than the point'n'shoot things you
>     see for Windows. To be used effectively it needs some thought.
>
>     Please note that my list email address only accepts mail from the list.
>
>     --
>
>     73,
>     Ged.
>
>
> clamav-users mailing list
> clamav-users at lists.clamav.net
> https://lists.clamav.net/mailman/listinfo/clamav-users
>
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml





More information about the clamav-users mailing list