1

I have successfully installed the command s3cmd (1.6.1) that I downloaded from the s3tools official web site. So the s3cmd software should be all right, and also the system libmagic.so.l itself is no problem.

Can anyone tell me wherever might be something wrong or missing when executing the s3cmd program?

Error loading some components of s3cmd (Import Error)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /bin/s3cmd
Problem: AttributeError: /lib64/libmagic.so.1: undefined symbol: magic_setparam
S3cmd:   1.6.1
python:   2.7.5 (default, Sep 12 2018, 05:31:16) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
environment LANG=en_US

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd", line 2900, in <module>
  File "build/bdist.linux-x86_64/egg/S3/S3.py", line 39, in <module>
  File "build/bdist.linux-x86_64/egg/magic.py", line 293, in <module>
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 373, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 378, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib64/libmagic.so.1: undefined symbol: magic_setparam

Other details

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 7.4 (Maipo)
Release:        7.4
Codename:       Maipo

$ rpm -qf /lib64/libmagic.so.1
file-libs-5.11-35.el7.x86_64

$ nm -D /lib64/libmagic.so.1|grep -Ei "setpar"
  • Have you tried running “yum update /lib64/libmagic.so.1” so you are using the up to date package? Most likely the AWS tools were built against a recent version of the OS. – jsbillings Feb 6 at 12:36
  • Thanks! But the system libmagic.so.1 has already been the latest version for RHEL 7! – lylklb Feb 7 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.