1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > roscore失败 chatgpt来解决“Traceback (most recent call last): File “/opt/ros/melodic/lib/python2...“

roscore失败 chatgpt来解决“Traceback (most recent call last): File “/opt/ros/melodic/lib/python2...“

时间:2023-04-23 10:18:55

相关推荐

roscore失败 chatgpt来解决“Traceback (most recent call last): File “/opt/ros/melodic/lib/python2...“

我又来记录我在重新安装ROS失败的经历了哈哈哈,这次是chatgpt帮我解决的。安装到最后输入“roscore”验证的时候,出现如下报错:

Traceback (most recent call last):

File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/init.py”, line 290, in main

write_pid_file(options.pid_fn, options.core, options.port)

File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/init.py”, line 112, in write_pid_file

with open(pid_fn, “w”) as f:

IOError: [Errno 13] Permission denied: ‘/home/lin/.ros/roscore-11311.pid’

报错图片如下:

看了很多方法都没用,然后我就去问chatgpt了,它教我输入两条指令,完美解决了

sudo mkdir -p /home/lin/.ros/sudo chown -R lin:lin /home/lin/.ros/#记得把上面的lin换成你的用户账号

然后关机重启ubuntu

附chatgpt的对话

如果上面的方法也不行 ,尝试

① 针对ROS的melodi版本

sudo apt-get install ros-melodic-desktop

② 针对ROS的kinetic版本

sudo apt-get install ros-kinetic-desktop

最后关机重启ubuntu!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。