Sorry, an error occurred in Snapcraft: Failed to initialize rosdep: Error initializing rosdep database
When doing:
~/catkin_ws$ sudo snapcraft
in this page: http://wiki.ros.org/ROS/Tutorials/Pac...
received an error like these:
Sorry, an error occurred in Snapcraft:
Failed to initialize rosdep: Error initializing rosdep database:
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down
If enter the web by hand:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
will see that:
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
My question is :
How to do to finish snapcraft?
What OS version and ROS version are you using? I had this happen the other day when building on the wrong OS version for the given ROS release on accident (which I logged as a bug). However, you can avoid that if you use bases, which I just updated the tutorial to use.
OS version: ubuntu 18.04,ROS version:melodic. I just tried again,and the same errors appeared.What should I do? Thank you.
I check the command line, saw:
This snapcraft project does not specify the base keyword, explicitly setting the base keyword enables the latest snapcraft features. This project is best built on 'Ubuntu 16.04', but is building on a 'Ubuntu 18.04' host. Read more about bases at https://docs.snapcraft.io/t/base-snap...
FYI.
According to your hints, i added " base: core 18" , tried again,then i got another error, let me change the BIOS to permit vm, and i did so,and tried for more one time, it works for a very long time to do sth about vm, when it finished, i got again another error:
Failed to load plugin: properties failed to load for workspace: Additional properties are not allowed ('rosdistro' was unexpected) Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
I did with --debug,and saw: Launching a VM. error: no changes of type "auto-refresh" found
snap "snapd" has no updates available Failed to load plugin: properties failed to load for workspace: Additional properties are not allowed ('rosdistro' was unexpected)
I didn't know how to do ?
Please look back through the tutorial, I updated it when I commented originally. By adding
base: core18
you no longer specify the rosdistro.Sorry about that,though I got it yesterday and tried just according to the new tutorial as belows: http://wiki.ros.org/ROS/Tutorials/Pac...
Is this tutorial you refered to yesterday? Is it updated? I didn't see sth new or different in it . I did my work according to this page all times.
Yes, it's updated. It now specifies a base and no longer specifies a rosdistro, which is the error you ran into 9 hours ago. It also explains what a base is, and how they relate to rosdistros.
Then how to solve it, so as to I can finish the whole tutorial of "Packaging your ROS project as a snap", now i can't have my snap yet.I didn't know how to to? Though I re-do accroding to the new updated tutorials,and saw the error again:
sudo snapcraft --debug
Launching a VM. error: no changes of type "auto-refresh" found
snap "snapd" has no updates available Failed to load plugin: properties failed to load for workspace: Additional properties are not allowed ('rosdistro' was unexpected)