【问题标题】:dockerized conan shows FileExistsError: [Errno 17] File exists: './util-linux-2.33.1/tests/expected/libmount/context-X-mount.mkdir'dockerized conan 显示 FileExistsError: [Errno 17] 文件存在:'./util-linux-2.33.1/tests/expected/libmount/context-X-mount.mkdir'
【发布时间】:2020-10-08 18:16:42
【问题描述】:

完整的错误是

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 的动机是为了让我在所有机器上都获得一个稳定的构建环境。 build/conan 被提取以存储构建之间的所有缓存文件,或者我希望它一旦成功。

我把它做成了一个仓库,所以你可以看看这个例子

编辑:我在继续调查时修改了 repo - 原始版本在提交历史记录中。

https://github.com/Aypahyo/dockerized-conan-shows-fileexistserror-errno-17-file-exists-util-linux-2.git

我想要的是在已安装的 docker 容器上的容器内使用 conan install,并在主机上进行缓存。

我的明显问题是:这里发生了什么,我该如何解决?

【问题讨论】:

标签: docker conan


【解决方案1】:

问题似乎源于我系统上的卷安装。

我遵循用户 uilianries 的建议,并着手构建基于官方 conan-docker-tools 容器的容器,并将卷移动到 docker 管理的卷中。 此错误消息现在消失了,尽管看起来这种方法通常可能不适合我想要做的事情。

我用我最终得到的内容修改了这个问题的存储库。 https://github.com/Aypahyo/dockerized-conan-shows-fileexistserror-errno-17-file-exists-util-linux-2

缓存不能按我的意愿工作,但这不是这个问题的目的。

【讨论】:

    猜你喜欢
    • 2022-01-18
    • 1970-01-01
    • 2015-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-14
    • 2022-07-06
    • 2017-09-19
    相关资源
    最近更新 更多