1

I freshly installed ubuntu , didnt expected this. and it has never happened before atleast for ubuntu 20.04.1 LTS . I did ran sudo apt update then I tried to install.

$ sudo apt install openssh-server -y
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:8.2p1-4) Depends: openssh-sftp-server Recommends: ssh-import-id but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I installed ssh-import-id and then tried to installed openss-sftp-server but I still get thsi depends error.

  • You didn't provide release details, but it looks like you're using a focal box with non-updated software lists (ie. sudo apt update needs to be run) OR you have incomplete sources, unless it's broken packages as the error states. Have you tried sudo apt -f install ? or another --fix-broken option. – guiverc Dec 20 '20 at 21:39
  • i never had to use -f flag before to pull dependencies – Ciasto piekarz Dec 20 '20 at 21:41
  • You're using a '-y' option and received an error, which means to me you're not understanding what you're doing. The '-y' answers yes to prompts because you understand the consequences & know the output before hand, which shouldn't be used if an error is possible (ie. operators error). The -f or --fix-broken option tells the machine to attempt to fix breakage done by prior commands (likely because of a -y or operator error) and isn't used with any packages... A package version in your message is out-dated thus my source/repository-list comment (could also be outdated mirror) - operator fixes – guiverc Dec 20 '20 at 21:45
  • I was able to isnstall -f flag – Ciasto piekarz Dec 20 '20 at 21:51
  • @guiverc yes it does solve the problem – Ciasto piekarz Dec 21 '20 at 07:18
  • The -f flag didn't work for me. However, I went through the process of fixing all my apt sources and settings and realized I did not have "recommended" selected under updates in Software Updates util. I had security updates only selected. Once I added that and ran through an apt update, all the updates loaded correctly and then I was able to load openssh-server without issue. – gregthegeek Feb 12 '21 at 10:34
  • In my case it was a conflict with the openssh-client package, once I removed that, the install went through fine. – Jehandad May 29 '23 at 20:33

0 Answers0