Errors and solutions encountered in installing ROS

报错1 Package ‘python-rosinstall’ has no installation candidate

E: Package 'python-rosinstall' has no installation candidate
E: Package 'python-rosinstall-generator' has no installation candidate
E: Package 'python-wstool' has no installation candidate
yyq@ubuntu:~$ sudo apt-get install python-wstool
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-wstool is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-wstool

E: Package 'python-wstool' has no installation candidate

The reason for the error is that the python3 version is supported now, and
the solution is to bring python3 to each command

yyq@ubuntu:~$ sudo apt-get install python3-rosinstall -y //安装成功
yyq@ubuntu:~$ sudo apt-get install python3-rosinstall-generator -y //安装成功
yyq@ubuntu:~$ sudo apt-get install python3-wstool -y //安装成功

报错2 bash: /opt/ros/melodic/setup.bash: No such file or directory

yyq@ubuntu:~$ source ~/.bashrc
bash: /opt/ros/melodic/setup.bash: No such file or directory
bash: /opt/ros/neotic/setup.bash: No such file or directory

Solution
Enter and gedit .bashrcpay attention here to determine whether there is a .bashrc file in the path you are currently in. If so, you can use this command, otherwise .bashrcadd the absolute path in front

error 3

apt-get /var/lib/dpkg/lock-frontend

Solution
Restart ubuntu

报错4 Unable to correct problems, you have held broken packages.

yyq@ubuntu:~$ sudo apt install catkin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 catkin : Depends: python3-catkin-pkg (>= 0.4.14-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The reason for the error is that when installing catkin, it is necessary to specify the version name of ros

Solution

yyq@ubuntu:~$ sudo apt install ros-noetic-catkin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-noetic-catkin is already the newest version (0.8.10-1focal.20210423.221558).
ros-noetic-catkin set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.

报错5 rosbash : Depends: catkin but it is not going to be installed

rosbash : Depends: catkin but it is not going to be installed

Solution
sudo apt install ros-noetic-rosbash //My version here is noetic, enter your own version name for different versions

Guess you like

Origin blog.csdn.net/m0_61780496/article/details/129912943