在构建c++项目的docker镜像时,由于库链接问题,在docker镜像中编译项目时会遇到问题
Docker文件位于https://github.com/chinthakarukshan/jasminegraph/tree/master/docker位置,它在ubuntu基础镜像之上构建一个docker镜像,安装项目所需的库。编译项目时,我遇到一个库链接问题,无法构建项目,错误如下。
/usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
make[3]: *** [JasmineGraph] Error 1
Dockerfile文件中已经安装了sqlite3库。但在链接库时失败。
下面是链接sqlite3库和项目的cmake代码。
target_link_libraries(JasmineGraph sqlite3)
下面是指向相应CMakeList文件的链接。
https://github.com/chinthakarukshan/jasminegraph/blob/master/CMakeLists.txt
发布于 2019-11-12 03:46:19
您需要安装dev版本:
RUN apt-get install -y libsqlite3-dev
https://stackoverflow.com/questions/58807563
复制相似问题