Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

it gives

deb http://packages.ros.org/ros/ubuntu


(lsb_release -sc) main

The problem most likely is that lsb_release has not been setup/installed correctly, which causes the command given in the installation tutorials to produce incorrect output, leading to a malformed ros-latest.list, which then causes apt to fail downloading indices from the ROS package repositories, leading to apt install never succeeding to install ROS.

Steps to fix:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt clean && sudo apt update

Pay special attention to the output of apt update. It should not report any errors or warnings.

Now you should be able to run sudo apt install ros-melodic-desktop-full successfully, and a source /opt/ros/melodic/setup.bash should also succeed.

it gives

deb http://packages.ros.org/ros/ubuntu


(lsb_release -sc) main

The problem most likely is that lsb_release has not been setup/installed correctly, which causes the command given in the installation tutorials to produce incorrect output, leading to a malformed ros-latest.list, which then causes apt to fail downloading indices from the ROS package repositories, leading to apt install never succeeding to install ROS.

Steps to fix:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt clean && sudo apt update

update

Pay special attention to the output of apt update. It should not report any errors or warnings.

Now you should be able to run sudo apt install ros-melodic-desktop-full successfully, and a source /opt/ros/melodic/setup.bash should also succeed.

Note that we're avoiding the use of lsb_release -sc here by just specifying the bionic value (which is the codename of your Ubuntu distribution). If you'd like to fix lsb_release (and are sure lsb_release -sc doesn't actually output anything) you could try to do something likesudo apt install --reinstall lsb-release lsb-coreand see iflsb_release -sc` starts working.

it gives

deb http://packages.ros.org/ros/ubuntu


(lsb_release -sc) main

The problem most likely is that lsb_release has not been setup/installed correctly, which causes the command given in the installation tutorials to produce incorrect output, leading to a malformed ros-latest.list, which then causes apt to fail downloading indices from the ROS package repositories, leading to apt install never succeeding to install ROS.

Steps to fix:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt clean && sudo apt update

Pay special attention to the output of apt update. It should not report any errors or warnings.

Now you should be able to run sudo apt install ros-melodic-desktop-full successfully, and a source /opt/ros/melodic/setup.bash should also succeed.

Note that we're avoiding the use of lsb_release -sc here by just specifying the bionic value (which is the codename of your Ubuntu distribution). If you'd like to fix lsb_release (and are sure lsb_release -sc doesn't actually output anything) anything) you could try to do something likelike sudo apt install --reinstall lsb-release lsb-core and see ifif lsb_release -sc` -sc starts working.