在Ubuntu上基于源码安装PCL-1.8时遇到如下一些问题,加以记录。
问题详细提示如下:
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is an other process using it?
解决方案如下:
(1)首先查看是否有apt-get这个程序在运行
ps aux|grep apt-get
(2)如果发现存在这样的程序在运行那么就kill掉,否则执行第三步删除锁文件。
(3)直接删除锁文件
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
问题详细提示如下:
Could Not find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS),
Could NOT find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY)
解决方案便是安装libpcap
(1)到网站“http://www.tcpdump.org/#latest-release”下载PCAP源码文件。
(2)源码安装PCAP
tar -zxvf libpcap-1.9.1.tar.gz
cd libpcap-1.9.1
sudo ./configure
sudo make
sudo make install
在执行sudo ./configure
过程中可能会出现找不到flex或者lex的问题,详情请见问题3。
问题详细提示如下:
error: Neither flex nor lex was found.
解决办法即输入如下命令进行安装:
sudo apt-get install flex bison
问题详细提示如下:
-- Could NOT find FZAPI (missing: FZAPI_LIBS FZAPI_INCLUDE_DIRS)
CMake Warning at cmake/pcl_targets.cmake:858 (message):
Fotonic camera support: not building because FZAPI not found
Call Stack (most recent call first):
CMakeLists.txt:297 (PCL_ADD_GRABBER_DEPENDENCY)
-- Could NOT find ensenso (missing: ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR)
CMake Warning at cmake/pcl_targets.cmake:858 (message):
IDS-Imaging Ensenso camera support: not building because Ensenso not found
Call Stack (most recent call first):
CMakeLists.txt:298 (PCL_ADD_GRABBER_DEPENDENCY)
-- Could NOT find davidSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR)
CMake Warning at cmake/pcl_targets.cmake:858 (message):
David Vision Systems SDK support: not building because davidSDK not found
Call Stack (most recent call first):
CMakeLists.txt:299 (PCL_ADD_GRABBER_DEPENDENCY)
-- Could NOT find DSSDK (missing: DSSDK_LIBRARIES DSSDK_INCLUDE_DIRS)
CMake Warning at cmake/pcl_targets.cmake:858 (message):
DepthSense SDK support: not building because DSSDK not found
Call Stack (most recent call first):
CMakeLists.txt:300 (PCL_ADD_GRABBER_DEPENDENCY)
-- Could NOT find RSSDK (missing: RSSDK_LIBRARIES RSSDK_INCLUDE_DIRS)
CMake Warning at cmake/pcl_targets.cmake:858 (message):
RealSense SDK support: not building because RSSDK not found
Call Stack (most recent call first):
CMakeLists.txt:301 (PCL_ADD_GRABBER_DEPENDENCY)
-- Checking for module 'metslib'
-- No package 'metslib' found
解决方案:对于上述文件的缺少均可忽略,不会影响后续的安装。
在编译PCL(执行cmake指令)的时候,出现错误:
undefined reference to `uuid_generate@UUID_1.0'
原因:
cmake PCL的时候,QT引用的是anaconda里的qt。
解决:
https://www.cnblogs.com/BambooEatPanda/p/10682670.html
https://stackoverflow.com/questions/45584275/getting-error-usr-lib-lib64-libsm-so-undefined-reference-to-uuid-unparse-l
I had exactly the same error message, but when compiling PCL (point cloud library). The error had a different cause and different solution. I’ll add it here, as this page came up when looking for solution - perhaps it will help someone.
My problem was that when doing cmake … before make it gave warnings like this:
CMake Warning at cmake/pcl_targets.cmake:194 (add_library):
Cannot generate a safe runtime search path for target pcl_io because
files in some directories may conflict with libraries in implicit directories:
All the directories that were referenced were under anaconda3/lib. I ignored it and make gave me the same error libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0’ and some more . The solution was to remove anaconda lib folder from the path, and build again. In detail:
Now the process uses system libraries, not the anaconda ones and compilation succeeds.
An example of modified PATH: if the original was /home/you/anaconda3/bin:/usr/local/bin:/usr/sbin:/usr/bin then the modified one is /usr/local/bin:/usr/sbin:/usr/bin
NB! You probably do not want to change the PATH permanently (your anaconda installation might stop working) that is why it is done from the terminal not from .bashrc file.
不要在.bashrc文件中进行更改,会造成anaconda无法使用
在终端中进行修改(第四步),在终端中执行PATH=/usr/local/bin等路径,这样即暂时修改了PATH的值。
需要在修改PATH变量的统一窗口中重新执行编译操作。