I'm trying to get source files of some package, it gives that error:
~$ sudo apt source ros-kinetic-nav-core Reading package lists... Done Need to get 6.606 B of source archives. Get:1 http://packages.ros.org/ros/ubuntu xenial/main ros-kinetic-nav-core 1.14.0-0xenial (dsc) [1.061 B] Get:2 http://packages.ros.org/ros/ubuntu xenial/main ros-kinetic-nav-core 1.14.0-0xenial (tar) [3.509 B] Get:3 http://packages.ros.org/ros/ubuntu xenial/main ros-kinetic-nav-core 1.14.0-0xenial (diff) [2.036 B] Fetched 6.606 B in 4s (1.455 B/s) dpkg-source: warning: extracting unsigned source package (ros-kinetic-nav-core_1.14.0-0xenial.dsc) dpkg-source: info: extracting ros-kinetic-nav-core in ros-kinetic-nav-core-1.14.0 dpkg-source: info: unpacking ros-kinetic-nav-core_1.14.0.orig.tar.gz dpkg-source: info: unpacking ros-kinetic-nav-core_1.14.0-0xenial.debian.tar.xz W: Can't drop privileges for downloading as file 'ros-kinetic-nav-core_1.14.0-0xenial.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Files are available but apt cannot extract them:
/opt/ros/kinetic/share/nav_core$ ls cmake ros-kinetic-nav-core-1.14.0 ros-kinetic-nav-core_1.14.0-0xenial.dsc package.xml ros-kinetic-nav-core_1.14.0-0xenial.debian.tar.xz ros-kinetic-nav-core_1.14.0.orig.tar.gz
sudo. Try without. Make sure you are in a filesystem location where you have permission to write (ie somewhere in your home directory) too.
roscd nav_corecommand to locate sources easily. I didn't think about permissions :P