运行roscore后出现该报错:
[rosout-1] process has died [pid 13103, exit code 127, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout __log:=/home/smile2/.ros/log/fe5831bc-b919-11eb-8175-3c58c26f458c/rosout-1.log].
log file: /home/smile2/.ros/log/fe5831bc-b919-11eb-8175-3c58c26f458c/rosout-1*.log
[rosout-1] restarting process
解决方法:
在home路径下打开.bashrc文件:
sudo gedit ~/.bashrc
对于 ubuntu16.04的kinetic版本在最后面加入下列代码即可解决:
LD_LIBRARY_PATH=/opt/ros/kinetic/lib
对于 ubuntu18.04的melodic版本在最后面加入下列代码即可解决:
LD_LIBRARY_PATH=/opt/ros/melodic/lib
然后让环境生效:
source ~/.bashrc
然后运行roscore就不会报错了