【发布时间】:2020-11-13 04:26:12
【问题描述】:
我正在尝试在那里安装 mongo-c-driver,然后是 http://mongoc.org/libmongoc/1.14.0/installing.html。由于我没有root权限,所以我运行了以下内容:
$ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.0-rc0/mongo-c-driver-1.17.0-rc0.tar.gz
$ tar xzf mongo-c-driver-1.17.0-rc0.tar.gz
$ cd mongo-c-driver-1.17.0-rc0
$ mkdir cmake-build
$ cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
$ make
$ make install
显示此错误的位置:
-- Install configuration: "RelWithDebInfo"
CMake Error at cmake_install.cmake:46 (file):
file cannot create directory: /usr/local/share/mongo-c-driver. Maybe need
administrative privileges.
所以我尝试执行这个:
./configure --prefix=/home/mypath/mongo-c-driver
哪个会出现错误:
./configure: No such file or directory
我发现的解决方案告诉我使用 ./autofen.sh 或 ./buildconf 或 autoreconf -i 也会产生错误...
【问题讨论】:
-
尝试在 make 调用中设置 DESTDIR:cmake.org/cmake/help/latest/envvar/DESTDIR.html#envvar:DESTDIR
标签: bash makefile configure mongo-cxx-driver mongo-c-driver