问题描述
完整错误是
ERROR: libmount/2.33.1: Error in source() method,line 26
tools.get(**self.conan_data["sources"][self.version])
FileExistsError: [Errno 17] File exists: './util-linux-2.33.1/tests/expected/libmount/context-X-mount.mkdir'
我的设置是一个dockerized conen,其中的容器是这样构建的:
FROM gcc:10.2.0
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y cmake
RUN apt-get install -y python3-pip
RUN pip3 install --upgrade pip
RUN pip3 install conan
RUN conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
CMD ["/bin/bash"]
我的基本路径包含文件夹build/conan
,并且基本路径中有一个conanfile.txt。
conanfile.txt包含:
[requires]
sdl2/2.0.12@bincrafters/stable
进行dockerize的动机是为了使我在所有机器上都处于稳定的buid环境。
提取build/conan
来存储版本之间的所有缓存文件,所以我希望它一旦成功就可以使用。
我将其放入存储库中,因此您可以查看此示例
编辑:我继续进行调查时修改了该存储库-原始记录在提交历史记录中。
我想要的是在已安装的docker容器上的容器内使用柯南安装并在主机上进行缓存。
我的明显问题是:这里发生了什么以及如何解决?
解决方法
问题似乎是由于系统上的卷挂载造成的。
我遵循了用户uilianries的建议,并基于一个正式的conan-docker-tools容器构建了一个容器,并将该卷移动到了Docker管理的卷中。 该错误消息现在消失了,尽管看起来这种方法通常可能不适合我想做的事情。
我用最终的结果修改了这个问题的存储库。 https://github.com/Aypahyo/dockerized-conan-shows-fileexistserror-errno-17-file-exists-util-linux-2
缓存无法按我的意愿运行,但这不是这个问题的所在。