catkin_make: cannot find 'std_msg'
I'm still in the process of setting up my ROS, I am getting an error message when i run this command
catkin_make
The above command is at step 4 here
Then i get this error Message:
Base path: /home/dayo/catkin_ws
Source space: /home/dayo/catkin_ws/src
Build space: /home/dayo/catkin_ws/build
Devel space: /home/dayo/catkin_ws/devel
Install space: /home/dayo/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/dayo/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/dayo/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/dayo/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.8
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by "std_msg" with any
of the following names:
std_msgConfig.cmake
std_msg-config.cmake
Add the installation prefix of "std_msg" to CMAKE_PREFIX_PATH or set
"std_msg_DIR" to a directory containing one of the above files. If
"std_msg" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
beginner_tutorials/CMakeLists.txt:10 (find_package)
-- Could not find the required component 'std_msg'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "std_msg" with any
of the following names:
std_msgConfig.cmake
std_msg-config.cmake
Add the installation prefix of "std_msg" to CMAKE_PREFIX_PATH or set
"std_msg_DIR" to a directory containing one of the above files. If
"std_msg" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
beginner_tutorials/CMakeLists.txt:10 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/dayo/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/dayo/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:290: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed*
This is the CMakeLists.txt :
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
)
catkin_package()
include_directories(
${catkin_INCLUDE_DIRS}
)
This is the Package.xml :
<?xml version="1.0"?>
<package format="2">
<name>beginner_tutorials</name>
<version>0.0.0</version>
<description>The beginner_tutorials package</description>
<maintainer email="dayo@todo.todo">dayo</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<export>
</export>
</package>
These are the outputs of the following commands:
dpkg -l | grep std-msgs
ii ros-kinetic-std-msgs 0.5.11-0xenial-20171104-175741-0800 amd64 Standard ROS Messages including common message ...
#q208679 has the same error message, they were able to debug it with additional catkin output and contents of the package CMakeLists.txt
Please update your question with the entire terminal output. There isn't enough information to figure out what's going on here.
Can you post your
package.xml
andCMakeLists.txt
?i've updated the terminal output, pls check it out
please check the package.xml and CMakeLists.text
Can you please copy and paste those files again using the preformatted text (
101010
) button? The current formatting makes the contents of those files are unreadable. And please remove any comments to shorten the length of them too.i have done that
It looks the same
i reposted the question while trying to effect the change you suggested but its still the same, maybe there is something i'm not getting. i'm new here. what else can i do
See #q270918 for how to use the preformatted text button
it says the page has been deleted
Sorry, #q270916
ok so i tried the post here but it was not working so i reposted the question and it is better. Please check for it
Please don't create a new question just to format your text. Open your
CMakeLists.txt
, copy the text, paste it into the editor here, then highlight the text, then click the preformatted text (101010
) button. Then do the same with yourpackage.xml
file.I've fixed the formatting of the
CMakeLists.txt
, but thepackage.xml
is a wall of text.@dayogeorge: please copy-paste your
package.xml
again into your question, select the text you just pasted, and click on the Preformattext Text button (or usectrl+k
).@dayogeorge: how did you install ROS?
std_msgs
is part of the core of ROS. It would be really strange for it not to be installed.@dayogeorge may you try one trick because that help for me always , save your CMakeList.txt file first then go to your Src directory delete your CMakeList.txt and then use Catkin_make it will help you
@dayogeorge I removed the comments in your
CMakeLists.txt
file so that it's shorter but yourpackage.xml
file is still unreadable. Can you please copy and paste it again? This time please make sure that it's readable (properly indented, etc.).thanks guys. Please check the package,xml now. So how should I proceed? I'm still at step 4 on this page: http://wiki.ros.org/ROS/Tutorials/Cre...
@dayogeorge How did you install ROS? Like @gvdhoorn said,
std_msgs
should have been installed with ROS.i followed the steps on ros.org what do you suggest i do?
What steps? We don't know what platform you are using.
i'm trying to installing kinetic on ubuntu. Amd i'm following the steps here
Can you tell us the exact command you used to install ROS?
And please link to all tutorials you followed for the installation.
Reason we keep asking about this is that
std_msgs
should definitely be there, and we're trying to make sure it's not an installation issue before checking other things.i used this command:
And it can be foundhere
I basically just followed all the step highlighted in the link above
Ok. Please do this:
source /opt/ros/kinetic/setup.bash
dpkg -l | grep std-msgs
rospack find std_msgs
ls -al /opt/ros/kinetic/share/std_msgs
add the output of the last three commands to your OP (edit it).
Also: what is the output of
which gcc
?Please check my edited post for the output of the commands above
That all looks ok. But there is something strange looking at the
catkin_make
output that you included in your OP: I don't see any mention of compilers orpthread
. Even with an empty workspacecatkin_make
prints lines about that for me.Can you remove any
source ...
lines from your ....
.bashrc
file (if you have any), save it, and do the following:mkdir -p $HOME/test_ws/src
cd $HOME/test_ws
source /opt/ros/kinetic/setup.bash
catkin_make
then copy-paste the whole output of
catkin_make
into your OP.And just making sure: your OS is
Ubuntu 16.04
or Ubuntu Xenial, correct?lsb_release -a
showsUbuntu 16.04
andxenial
?yes my ubuntun is 16.04.3 LTS xenial. pls how do i access the .bashrc file?
It's in your home directory. Something like
gedit $HOME/.bashrc
should open it.Look at the end. If there are lines like
source /opt/ros/kinetic/setup.bash
orsource ~/catkin_ws/devel/setup.bash
remove them. Save, close, follow steps in previous comment.thanks a lot bro. I removed the source and then i ran the commands. check the output of catkin_make in my edited post. Looks like it is done right?
I do not see any update.
Re: new run of
catkin_make
: yes, that looks a lot better.Can you now do:
ls -al /home/dayo/catkin_ws
ls -al /home/dayo/catkin_ws/src
and add the output to your OP?
It's good that things are now ok, but without knowing what caused the problems initially, it's hard to avoid it.
you mean updates in terms of std_msgs?
No I meant that you had posted your comment "I've edited my post", but I did not see an updated post.
pls check for all the outputs
they are towards the end of my edited post
ah. Please delete (
rm -r
) thebeginner_tutorials
directory in/home/dayo/catkin_ws
.Catkin packages should be stored only in the source space of your workspace. Not in the root.
After you've removed it, try
catkin_make
again.please i didnt get your last message...you men i should delete the beginner_tutorials file in this directory /home/dayo/catkin_ws ? what is rm -r ?
I'm sorry for the multiple questions pls.
please stop writing 'please' everywhere. We already know that you post here because you want help.
that is how you delete directories in Linux on the command line ..
/home/dayo/catkin_ws/beginner_tutorials
is a directory, but yes, you should remove it.lol,,ok ..no more please.
So check my edited post for the new catkin_make output