我有一个CentOS 7机器与Oracle Linux 8 docker容器gcc-toolset-11。当我尝试在容器中构建项目时,我得到以下错误:
extracting debug info from /cm/build/rpmbuild/BUILDROOT/MyPackage-9.1.0-497.ol8.x86_64/usr/local/bin/mariadb
gdb-add-index: No index was created for /cm//build/rpmbuild/BUILDROOT/MyPackage-9.1.0-497.ol8.x86_64/usr/local/bin/mariadb
gdb-add-index: [Was there no debuginfo? Was there already an index?]
gdb-add-index: No index was created for /cm/build/rpmbuild/BUILDROOT/MyPackage-9.1.0-497.ol8.x86_64/usr/local/bin/mariadb-binlog
gdb-add-index: [Was there no debuginfo? Was there already an index?]
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
/usr/lib/rpm/find-debuginfo.sh: line 501: /tmp/find-debuginfo.NCirqm/res.*: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.tHJ5xo (%install)
帮忙吗?
我明白了。我在让source /opt/rh/gcc-toolset-11/enable
工作时遇到了麻烦,所以我把Docerfile中的所有路径作为ENV
命令。但显然我做错了。修正了坏的ENV
命令,现在它正确构建。