Depends: ros-kinetic-simulators but it is not going to be installed
之前一直正常的apt,突然就不好用了。一种原因是已经安装的包的版本和当前要安装的包出现了版本冲突。这样的情况下,只要卸载之后再重新安装就好了。
卸载可以用
$apt-get autoremove
$apt-get purge your_pacakename
$ sudo aptitude install libgazebo7-dev
aptitude在PC机的ubuntu上可以正常使用。
如果是在tx2或者xavier上就不要使用aptitude了;之前亲测,在xavier上用aptitude,结果调入万丈深渊,apt都挂掉了。
卸载了冲突包之后,在按正常流程安装所需要的包就好了。
----------------------------
$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:7.2p2-4)
Depends: openssh-sftp-server but it is not going to be installed
Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
解决方法
给需要的源打钩,不需要的源不打钩。
关闭后$sudo apt-get update搞定。
如果还是不行,则,
https://sourcedigit.com/22691-unmet-dependencies-error-ubuntu-unmet-dependencies-ubuntu-desktop/
How To Fix Unmet Dependencies Error On Ubuntu
By Sourabh / September 11, 2017Category: How To, Ubuntu
How to fix unmet dependencies error on Ubuntu. If you see the message “the following packages have unmet dependencies”, here’s how to remove packages with unmet dependencies on Linux Ubuntu Systems.
Unmet Dependency Errors
Unmet Dependency means that the package you are trying to install is looking for “dependencies” that it cannot find in the current version. The simple way to fix this error is to update the package database, clean out the package cache, and download-and-reinstall the newer version.
sudo apt-get autoclean
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get -f install
If the output is: 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. That means the solution failed and you will have to run the following commands to fix the error.
Method 1
sudo apt-get update
sudo apt-get -u dist-upgrade
sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
sudo apt-get remove --dry-run package-name
sudo apt-get -u dist-upgrade
sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
sudo apt-get remove --dry-run package-name
Method 2
sudo apt-get update
sudo apt-get -u dist-upgrade
sudo apt-get clean package-name
sudo apt-get install --reinstall package-name
sudo apt-get -u dist-upgrade
sudo apt-get clean package-name
sudo apt-get install --reinstall package-name
其他方案
发现一个好用scp,可视功能。