我正在尝试运行这个命令:sudo apt install -f
我有这个错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
snapd-login-service
Use 'sudo apt autoremove' to remove it.
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ros-kinetic-librealsense (1.12.1-0xenial-20190607-170900-0800) ...
Kernel preparation unnecessary for this kernel. Skipping...
Running the pre_build script:
dkms: Pre-build script started...
Downloading kernel sources...
Reading package lists...
Picking 'linux-signed-hwe' as source package instead of 'linux-image-4.15.0-55-generic'
Need to get 12.4 kB of source archives.
Get:1 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main linux-signed-hwe 4.15.0-55.60~16.04.2 (dsc) [1,829 B]
Get:2 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main linux-signed-hwe 4.15.0-55.60~16.04.2 (tar) [10.6 kB]
dpkg-source: info: extracting linux-signed-hwe in linux-signed-hwe-4.15.0
dpkg-source: info: unpacking linux-signed-hwe_4.15.0-55.60~16.04.2.tar.xz
W: Can't drop privileges for downloading as file 'linux-signed-hwe_4.15.0-55.60~16.04.2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Fetched 12.4 kB in 0s (237 kB/s)
grep: drivers/media/usb/uvc/uvc_driver.c: No such file or directory
INFO: No Intel RealSense(TM) cameras are currently supported.
Patching uvcvideo sources...
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/drivers/media/usb/uvc/Makefile b/drivers/media/usb/uvc/Makefile
|index c26d12fdb8f4..d86cf22155d1 100644
|--- a/drivers/media/usb/uvc/Makefile
|+++ b/drivers/media/usb/uvc/Makefile
--------------------------
File to patch: Picking 'linux-signed-hwe' as source package instead of 'linux-image-4.15.0-55-generic'
Picking 'linux-signed-hwe' as source package instead of 'linux-image-4.15.0-55-generic': No such file or directory
File to patch:
请帮忙!
答案1
我设法解决了它。
我按下 Ctrl + C 来停止该进程,然后我看到:
File to patch: ^Cdpkg: error processing package ros-kinetic-librealsense (--configure):
subprocess installed post-installation script was interrupted
dpkg: dependency problems prevent configuration of ros-kinetic-realsense-camera:
ros-kinetic-realsense-camera depends on ros-kinetic-librealsense; however:
Package ros-kinetic-librealsense is not configured yet.
dpkg: error processing package ros-kinetic-realsense-camera (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-turtlebot-bringup:
ros-kinetic-turtlebot-bringup depends on ros-kinetic-realsense-camera; however:
Package ros-kinetic-realsense-camera is not configured yet.
dpkg: error processing package ros-kinetic-turtlebot-bringup (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-turtlebot:
ros-kinetic-turtlebot depends on ros-kinetic-turtlebot-bringup; however:
Package ros-kinetic-turtlebot-bringup is not configured yet.
dpkg: error processing package ros-kinetic-turtlebot (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-turtlebot-teleop:
ros-kinetic-turtlebot-teleop depends on ros-kinetic-turtlebot-bringup; however:
Package ros-kinetic-turtlebot-bringup is not configured yet.
dpkg: error processing package ros-kinetic-turtlebot-teleop (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Errors were encountered while processing:
ros-kinetic-librealsense
ros-kinetic-realsense-camera
ros-kinetic-turtlebot-bringup
ros-kinetic-turtlebot
我用了:sudo dpkg --purge <the packages which could not be processed>
然后:sudo apt install debian-keyring linux-source-4.15.0
(4.15.0是内核版本)