在home路径下打开.bashrc文件: gedit ~/.bashrc 对于kinetic版本在最后面加入下列代码即可解决: LD_LIBRARY_PATH=/opt/ros/kinetic/lib 最后再 source ~/.bashrc