0

I tried doing sudo apt install openssh-server and getting the following error, any help would be much appreciated. I am using Ubuntu 20.04 Focal

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-4ubuntu2.10) 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.

  • Check your sources & release you're running; your paste includes a non-focal package requirement (https://packages.ubuntu.com/search?keywords=openssh-client&searchon=names&suite=all§ion=all) so I'd start with reading the output of sudo apt update) & re-consider whatever source you added last (or before the problems started occurring if you're actually using focal) – guiverc Nov 03 '22 at 21:37
  • 2
    openssh-client version 1:7.2p2-4ubuntu2.10 is in Ubuntu 16.04 (not 18.04, not 20.04). This suggests that your sequential release-upgrades to 20.04 suffered terrible errors that you have not disclosed, or that you used some nonstandard method of release-upgrade that encountered problems yet undisclosed, or that you added wrong-version Ubuntu sources to your system. Edit your question to disclose some of that context. If you have no idea how your system came to be so damaged, then backup your data and reinstall Ubuntu. – user535733 Nov 03 '22 at 22:05
  • @user535733 I am new to development, it would be great if you can guide me how can I start trouble shooting this problem, so that I can learn also. – Ankit Kumar Nov 04 '22 at 03:38
  • 1
    You already started troubleshooting by reading the output. Good! Next, the devscripts package includes a tool call rmadison -- that's one easy way to determine which version of a package is in which release of Ubuntu (there's also packages.ubuntu.com). Next, we ask ourselves, "why is a 16.04 package installed on a 20.04 system?" The fix is to uninstall all 16.04 packages and install 20.04 packages instead. However, apt will automatically do that anyway. So something else is wrong. At that point, we have run out of data to work with. – user535733 Nov 04 '22 at 12:41
  • I guess I found out where I did the mistake, when I am doing sudo apt update I am getting the following hints, which shows that this is the wrong package that's creating all the problem, now working with realsense developers to resolve this issue. Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease Hit:3 http://packages.ros.org/ros/ubuntu focal InRelease – Ankit Kumar Nov 04 '22 at 14:18

0 Answers0