当我尝试安装 git 时出现此错误:
$ sudo apt install git
[sudo] password for nitk:
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1.3).
The following packages were automatically installed and are no longer required:
linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic
linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
linux-image-4.10.0-28-generic linux-image-4.10.0-37-generic
linux-image-extra-4.10.0-28-generic linux-image-extra-4.10.0-37-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 299 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up matlab-support (0.0.21) ...
No default Matlab path found. Exiting.
dpkg: error processing package matlab-support (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of matlab-gdf:
matlab-gdf depends on matlab-support; however:
Package matlab-support is not configured yet.
dpkg: error processing package matlab-gdf (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
matlab-support
matlab-gdf
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
看起来您没有安装 Matlab 或者它的路径未知。
如果您不需要 Matlab 或 Matlab 支持,请尝试运行:
apt-get remove matlab-support
如果您确实需要 Matlab 和 Matlab 支持,请尝试运行:
apt-get install matlab-support
并提供 Matlab 安装的完整路径。