Yum install ClamAV missing libraries


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Yum install ClamAV missing libraries
# 1  
Old 07-28-2018
Yum install ClamAV missing libraries

Hello, I'm currently following a tutorial for ClamAV with a lambda function.

The tutorial has a shell script with the following:

Code:
#!/usr/bin/env bash
set -e
LAMBDA_FILE="lambda.zip"

rm -f ${LAMBDA_FILE}

mkdir -p clamav

echo "-- Downloading AmazonLinux container --"
docker pull amazonlinux
docker create -i -t -v ${PWD}/clamav:/home/docker  --name s3-antivirus-builder amazonlinux
docker start s3-antivirus-builder

echo "-- Updating, downloading and unpacking clamAV and ClamAV update --"
docker exec -it -w /home/docker s3-antivirus-builder yum install -y cpio yum-utils
docker exec -it -w /home/docker s3-antivirus-builder yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
docker exec -it -w /home/docker s3-antivirus-builder yum-config-manager --enable epel
docker exec -it -w /home/docker s3-antivirus-builder yumdownloader -x \*i686 --archlist=x86_64 clamav clamav-lib clamav-update
docker exec -it -w /home/docker s3-antivirus-builder /bin/sh -c "echo 'folder content' && ls -la"
docker exec -it -w /home/docker s3-antivirus-builder /bin/sh -c "rpm2cpio clamav-0*.rpm | cpio -idmv"
docker exec -it -w /home/docker s3-antivirus-builder /bin/sh -c "rpm2cpio clamav-lib*.rpm | cpio -idmv"
docker exec -it -w /home/docker s3-antivirus-builder /bin/sh -c "rpm2cpio clamav-update*.rpm | cpio -idmv"

docker stop s3-antivirus-builder
docker rm s3-antivirus-builder

mkdir ./bin

echo "-- Copying the executables and required libraries --"
cp clamav/usr/bin/clamscan clamav/usr/bin/freshclam clamav/usr/lib64/* bin/.

echo "-- Cleaning up ClamAV folder --"
rm -rf clamav

cp -R ./s3-antivirus/* bin/.

pushd ./bin
zip -r9 ${LAMBDA_FILE} *
popd

cp bin/${LAMBDA_FILE} .

echo "-- Cleaning up bin folder --"
rm -rf bin

Here is the terminal output:

Code:
-- Downloading AmazonLinux container --
Using default tag: latest
latest: Pulling from library/amazonlinux
638b75f800bf: Pull complete 
Digest: sha256:802212e258f7b67b5754c795f17395937918b29629dd72af615b768f0fcb6cf3
Status: Downloaded newer image for amazonlinux:latest
e23d0d70f8bca60404a2093982c18cf3b516c27101d9729fd2baf485525dc41f
s3-antivirus-builder
-- Updating, downloading and unpacking clamAV and ClamAV update --
Loaded plugins: ovl, priorities
amzn2-core                                               | 2.4 kB     00:00     
(1/3): amzn2-core/2/x86_64/group_gz                        | 2.4 kB   00:00     
(2/3): amzn2-core/2/x86_64/updateinfo                      |  39 kB   00:00     
(3/3): amzn2-core/2/x86_64/primary_db                      |  14 MB   00:00     
Package cpio-2.11-25.amzn2.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-45.amzn2.0.1 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-45.amzn2.0.1.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-45.amzn2.0.1.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.amzn2.3 will be installed
---> Package python-kitchen.noarch 0:1.1.1-5.amzn2 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.amzn2.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-1.amzn2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch        Version                  Repository       Size
================================================================================
Installing:
 yum-utils           noarch      1.1.31-45.amzn2.0.1      amzn2-core      120 k
Installing for dependencies:
 libxml2-python      x86_64      2.9.1-6.amzn2.3          amzn2-core      246 k
 python-chardet      noarch      2.2.1-1.amzn2            amzn2-core      227 k
 python-kitchen      noarch      1.1.1-5.amzn2            amzn2-core      266 k

Transaction Summary
================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 858 k
Installed size: 4.2 M
Downloading packages:
(1/4): libxml2-python-2.9.1-6.amzn2.3.x86_64.rpm           | 246 kB   00:00     
(2/4): python-chardet-2.2.1-1.amzn2.noarch.rpm             | 227 kB   00:00     
(3/4): yum-utils-1.1.31-45.amzn2.0.1.noarch.rpm            | 120 kB   00:00     
(4/4): python-kitchen-1.1.1-5.amzn2.noarch.rpm             | 266 kB   00:00     
--------------------------------------------------------------------------------
Total                                              2.9 MB/s | 858 kB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-chardet-2.2.1-1.amzn2.noarch                          1/4 
  Installing : python-kitchen-1.1.1-5.amzn2.noarch                          2/4 
  Installing : libxml2-python-2.9.1-6.amzn2.3.x86_64                        3/4 
  Installing : yum-utils-1.1.31-45.amzn2.0.1.noarch                         4/4 
  Verifying  : yum-utils-1.1.31-45.amzn2.0.1.noarch                         1/4 
  Verifying  : python-kitchen-1.1.1-5.amzn2.noarch                          2/4 
  Verifying  : libxml2-python-2.9.1-6.amzn2.3.x86_64                        3/4 
  Verifying  : python-chardet-2.2.1-1.amzn2.noarch                          4/4 

Installed:
  yum-utils.noarch 0:1.1.31-45.amzn2.0.1                                        

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.amzn2.3 python-chardet.noarch 0:2.2.1-1.amzn2
  python-kitchen.noarch 0:1.1.1-5.amzn2  

Complete!
Loaded plugins: ovl, priorities
epel-release-latest-7.noarch.rpm                         |  15 kB     00:00     
Examining /var/tmp/yum-root-MpdNoE/epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
Marking /var/tmp/yum-root-MpdNoE/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch       Version    Repository                         Size
================================================================================
Installing:
 epel-release     noarch     7-11       /epel-release-latest-7.noarch      24 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 24 k
Installed size: 24 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                     1/1 
  Verifying  : epel-release-7-11.noarch                                     1/1 

Installed:
  epel-release.noarch 0:7-11                                                    

Complete!
Loaded plugins: ovl, priorities
================================== repo: epel ==================================
[epel]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/2
baseurl = 
cache = 0
cachedir = /var/cache/yum/x86_64/2/epel
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage = 
enabled = True
enablegroups = True
exclude = 
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/2/epel/gpgcadir
gpgcakey = 
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/2/epel/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
hdrdir = /var/cache/yum/x86_64/2/epel/headers
http_caching = all
includepkgs = 
ip_resolve = 
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid = 
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink = https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64
minrate = 0
mirrorlist = 
mirrorlist_expire = 86400
name = Extra Packages for Enterprise Linux 7 - x86_64
old_base_cache_dir = 
password = 
persistdir = /var/lib/yum/repos/x86_64/2/epel
pkgdir = /var/cache/yum/x86_64/2/epel/packages
priority = 99
proxy = False
proxy_dict = 
proxy_password = 
proxy_username = 
repo_gpgcheck = False
report_instanceid = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert = 
sslclientcert = 
sslclientkey = 
sslverify = True
throttle = 0
timeout = 30.0
ui_id = epel/x86_64
ui_repoid_vars = releasever,
   basearch
username = 

Loaded plugins: ovl, priorities
epel/x86_64/metalink                                     |  19 kB     00:00     
epel                                                     | 3.2 kB     00:00     
(1/3): epel/x86_64/group_gz                                |  88 kB   00:00     
(2/3): epel/x86_64/updateinfo                              | 928 kB   00:00     
(3/3): epel/x86_64/primary                                 | 3.5 MB   00:00     
epel                                                                12624/12624
143 packages excluded due to repository priority protections
warning: /home/docker/clamav-0.100.1-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for clamav-0.100.1-1.el7.x86_64.rpm is not installed
(1/3): clamav-0.100.1-1.el7.x86_64.rpm                     | 641 kB   00:00     
(2/3): clamav-lib-0.100.1-1.el7.x86_64.rpm                 | 757 kB   00:00     
(3/3): clamav-update-0.100.1-1.el7.x86_64.rpm              | 100 kB   00:00     
folder content
total 1508
drwxr-xr-x 5 root root    160 Jul 28 16:38 .
drwxr-xr-x 1 root root   4096 Jul 28 16:38 ..
-rw-r--r-- 1 root root 656602 Jul 11 12:12 clamav-0.100.1-1.el7.x86_64.rpm
-rw-r--r-- 1 root root 775574 Jul 11 12:12 clamav-lib-0.100.1-1.el7.x86_64.rpm
-rw-r--r-- 1 root root 101978 Jul 11 12:12 clamav-update-0.100.1-1.el7.x86_64.rpm
./usr/bin/clambc
./usr/bin/clamconf
./usr/bin/clamdscan
./usr/bin/clamdtop
./usr/bin/clamscan
./usr/bin/clamsubmit
./usr/bin/sigtool
./usr/share/doc/clamav-0.100.1
./usr/share/doc/clamav-0.100.1/clamdoc.pdf
./usr/share/doc/clamav-0.100.1/phishsigs_howto.pdf
./usr/share/doc/clamav-0.100.1/signatures.pdf
./usr/share/man/man1/clambc.1.gz
./usr/share/man/man1/clamconf.1.gz
./usr/share/man/man1/clamdscan.1.gz
./usr/share/man/man1/clamdtop.1.gz
./usr/share/man/man1/clamscan.1.gz
./usr/share/man/man1/clamsubmit.1.gz
./usr/share/man/man1/sigtool.1.gz
./usr/share/man/man5/clamav-milter.conf.5.gz
3152 blocks
./usr/lib64/libclamav.so.7
./usr/lib64/libclamav.so.7.1.1
./usr/lib64/libclammspack.so.0
./usr/lib64/libclammspack.so.0.1.0
3951 blocks
./etc/cron.d/clamav-update
./etc/freshclam.conf
./etc/logrotate.d/clamav-update
./etc/sysconfig/freshclam
./usr/bin/freshclam
./usr/share/clamav/freshclam-sleep
./usr/share/man/man1/freshclam.1.gz
./usr/share/man/man5/freshclam.conf.5.gz
423 blocks
s3-antivirus-builder
s3-antivirus-builder
-- Copying the executables and required libraries --
-- Cleaning up ClamAV folder --
~/docker_projects/lambda-s3-antivirus/bin ~/docker_projects/lambda-s3-antivirus
  adding: antivirus.js (deflated 61%)
  adding: clamav.js (deflated 70%)
  adding: clamscan (deflated 68%)
  adding: constants.js (deflated 68%)
  adding: download-definitions.js (deflated 54%)
  adding: freshclam (deflated 64%)
  adding: freshclam.conf (deflated 13%)
  adding: libclamav.so.7 (deflated 58%)
  adding: libclamav.so.7.1.1 (deflated 58%)
  adding: libclammspack.so.0 (deflated 49%)
  adding: libclammspack.so.0.1.0 (deflated 49%)
  adding: package-lock.json (deflated 69%)
  adding: package.json (deflated 16%)
  adding: utils.js (deflated 64%)
~/docker_projects/lambda-s3-antivirus
-- Cleaning up bin folder --

I upload the zip to the AWS lambda function and get missing library error:

Code:
./clamscan: error while loading shared libraries: libjson-c.so.2: cannot open shared object file: No such file or directory

To solve this issue I just included the libson-c file in the script file. Now the program is complaining about other missing libraries that were supposed to be included with clamav download.

Would it be possible to download all the ClamAV dependencies or libraries separately with yum?

Also, here are the .so file names that come in the final zip:
libclamav.so.7, libclamav.so.7.1.1, libclammspack.so.0 , and libclammspack.so.0.1.0
# 2  
Old 07-30-2018
Ended up just yum installing the libraries needs independently
This User Gave Thanks to ottorocket18 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Installation of virt-manager while yum update and yum install rhvm does not work

I have downloaded RHEV-H 4.2 Red Hat Virtualization - Red Hat Customer Portal (RHVirtualization 4.2 Host and Manager iso). I uploaded the image and installed on an HP G9 server baremetal. I found I dont have a WAN/net connectivity later on HPG9 server. How can I still install virt-manager on... (1 Reply)
Discussion started by: Paras Pandey
1 Replies

2. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies

3. Red Hat

Yum cannot install from repository

Hi guys, thanks for you help on this issue. I built a dvd repository on my server and when I try to install a package from it, I get this error ftp://10.0.0.12/pub/Packages/httpd-2.2.15-26.el6.x86_64.rpm: PYCURL ERROR 9 - "Server denied you to change to the given directory" I will... (2 Replies)
Discussion started by: cjashu
2 Replies

4. UNIX for Dummies Questions & Answers

Trying to install using YUM

Hi, working on CentOS 5.7 64 bit. I need to install syslog-ng. First I downloaded syslog-ng RPM. When I install I get many dependencies error messages. rpm -ivh syslog-ng-3.3.3-1.mga2.x86_64.rpm warning: syslog-ng-3.3.3-1.mga2.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID... (2 Replies)
Discussion started by: samnyc
2 Replies

5. Red Hat

how can i get the install path from yum?

Hello all i install several application using yum in CentOS now i like to see the installed application path's where each component yum downloaded got installed how can i do that ? (1 Reply)
Discussion started by: umen
1 Replies

6. Shell Programming and Scripting

Find programs that are missing libraries.

I had to whip this up, and it seems useful enough to post here. Say you have been cleaning up your filesystem, and you removed a bunch of libraries, or you shuffled around some library directories, and aren't sure if ld.so.conf is correctly setup. You want to sweep through your file system looking... (0 Replies)
Discussion started by: otheus
0 Replies

7. HP-UX

Adode reader does not work - libraries are missing - where to get them?

Hi. I use HP-UX 11.23. After installation of adobe reader I've got the following error: /usr/lib/dld.sl: Can't open shared library: /user/unibat/hppahpux/gtk/usr/local/lib/libgdk_pixbuf_xlib-2.0.sl /usr/lib/dld.sl: No such file or directory The first library exists (dld.sl). Where could I... (4 Replies)
Discussion started by: netwalker
4 Replies

8. Linux

[help] can not install KDE by yum

Hi, I installed Fedora 7 without GNOME and KDE from DVD. Using console is not convenient, so I would like to install KDE. I do some step like this: ---------------------------- 1. I use local repository from DVD: /mnt/dvd 2. from command windown: # yum groupinstall KDE ..................... (1 Reply)
Discussion started by: kholostoi
1 Replies

9. Linux

install yum

I have a centos 4.x box and for some reason yum is not installed on it. Is there a howto on how to do this? thanks! (3 Replies)
Discussion started by: mcraul
3 Replies

10. Programming

libraries missing in C

some libraries are missing like conio.h and syslib.h how can i have them installed ? (4 Replies)
Discussion started by: C|[anti-trust]
4 Replies
Login or Register to Ask a Question