python - 在 docker 容器上安装 rdiff

标签 python gcc docker librsync

我正在尝试使用 rdiff 从 docker 容器中创建备份解决方案。我有 python install 和 python-dev 包,但是当我运行安装命令时:

python ./setup.py install 

我收到以下错误

running install
running build
running build_py
running build_ext
building 'rdiff_backup._librsync' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c _librsyncmodule.c -o build/temp.linux-x86_64-2.7/_librsyncmodule.o
_librsyncmodule.c:25:22: fatal error: librsync.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

最佳答案

您的容器需要 librsync-dev 包。

关于python - 在 docker 容器上安装 rdiff,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22013650/

相关文章:

gcc - 这是优化错误吗?

docker - docker build 期间的 SSH 代理转发

spring-boot - 在 Spring application.yaml 中读取 docker env 变量

python - cv2.VideoCapture 在 docker 容器中不起作用

python - 为什么 n=[1,2,3,4,5,6,7,8],n[ :6:-2] is [8] in Python?

python - 类(class) 我是如何理解它们的。如果我错了请纠正我

c++ - 如何在 gcc 中声明和定义一个纯函数?

c++ - 为什么 gcc 与 clang 相比会产生这种奇怪的程序集?

python - 如何使LoginView(FormView)的Django用户名字段小写?

python - setup.py 忽略完整路径依赖,而是在 pypi 中查找 "best match"