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) you could try to do something like sudo apt install --reinstall lsb-release lsb-core
and see if lsb_release -sc
starts working.
is this a typo in your question or what you're actually seeing it should be
/opt/ros....
This could be causing your problem.If you look at the contents of your .bashrc script you can check and fix the typo if that's the case
i copy pasted from http://wiki.ros.org/melodic/Installation/Ubuntu and it is like
Ok.
So what is the output of
ls -al /opt/ros/melodic/setup.bash
?And the output of
lsb_release -a
?And of
uname -a
?Output of 1st
ls: cannot access '/opt/ros/melodic/setup.bash' : No such file or directory
2ndNo LSB modules are available.
And for 3rd one.. my PC name, Ubuntu version, GNU/LinuxWe need the verbatim, exact copy-paste of the
uname -a
output. You can change your PC name, but leave the rest.As to the rest: it would appear that you haven't installed ROS.
unaame -a
output asi even tried instaling LSB but it shows
Ah, that would appear to be your problem: it's likely that
apt install ros-melodic-desktop-full
didn't actually succeed. Didn't you get an error?I'm pretty sure that the fact that
lsb_release
doesn't work is the cause of your problems.What is the output of
cat /etc/apt/sources.list.d/ros-latest.list
?it gives
output of trying install ros was w/o error when i run 1st time but it gives this now