首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在语法NAS上运行s3cmd

在语法NAS上运行s3cmd
EN

Server Fault用户
提问于 2019-04-17 22:08:14
回答 1查看 466关注 0票数 0

我正在使用DSM6.0在语法NAS上使用s3cmd,并得到了这个错误。我已经安装了蟒蛇魔法库但还是。

代码语言:javascript
复制
[root@OFFICE_01 arc]# s3cmd --version

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  following lines (removing any private
  info as necessary) to:
   s3tools-bugs@lists.sourceforge.net

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

Invoked as: /bin/s3cmd --version
Problem: RuntimeError: can not find library magic
S3cmd:   2.0.1+
python:   2.7.12 (default, Apr 20 2017, 02:26:22) 
[GCC 4.9.3 20150311 (prerelease)]
environment LANG=en_US.UTF-8

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/s3cmd-2.0.1-py2.7.egg/EGG-INFO/scripts/s3cmd", line 3054, in <module>
  File "/usr/bin/S3/S3.py", line 50, in <module>
    import magic
  File "/usr/lib/python2.7/site-packages/magic.py", line 155, in <module>
    dll = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1') or ctypes.util.find_library('cygmagic-1')
  File "/usr/lib/python2.7/ctypes/util.py", line 242, in find_library
    raise RuntimeError("can not find library %s" % name)
RuntimeError: can not find library magic

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  above lines (removing any private
  info as necessary) to:
   s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!``
EN

回答 1

Server Fault用户

回答已采纳

发布于 2019-04-18 20:14:05

通过升级到Python3和pip3,我成功地利用了pip3:

>opkg install python3-pip

>pip3 install s3cmd

代码语言:javascript
复制
[root@OFFICE_01 ~]# s3cmd --version
s3cmd version 2.0.2
票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/963566

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档