我尝试make pgrouting
。我做错了什么?
anton@anton-P4I45Gx-PE:~/src/pgrouting$ cmake -DWITH_TSP=ON -DWITH_DD=ON .
-- POSTGRESQL_EXECUTABLE is POSTGRESQL_EXECUTABLE-NOTFOUND
-- Found PostgreSQL: /usr/include/postgresql/8.4/server, /usr/lib/libpq.so
Boost headers were found here: /usr/include
Output directory for libraries is set to /usr/lib/postgresql/8.4/lib
Installation directory for libraries is set to /usr/lib/postgresql/8.4/lib and for SQL files is set to /usr/share/pgrouting
Installation directory for libraries is set to /usr/lib/postgresql/8.4/lib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/anton/src/pgrouting
anton@anton-P4I45Gx-PE:~/src/pgrouting$ make
Linking CXX shared library ../../../lib/librouting_tsp.so
/usr/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
make[2]: *** [lib/librouting_tsp.so] Error 1
make[1]: *** [extra/tsp/src/CMakeFiles/routing_tsp.dir/all] Error 2
make: *** [all] Error 2
答案1
根据文件系统布局,我猜这是一个 Debian 或 Ubuntu 系统,所以我会说
apt-get install libgmp-dev