Installing Rsync failing

Hello,

I am just trying to get rsync installed on OSMC. I have tried sudo apt-get install rsync
or from root just apt-get install rsync

I get the following:

apt-get install rsync

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
ssh-app-osmc
The following NEW packages will be installed:
rsync
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/380 kB of archives.
After this operation, 535 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 25215 files and directories currently installed.)
Removing ssh-app-osmc (1.2.3) …
Removing ‘diversion of /etc/ssh/sshd_config to /etc/ssh/sshd_config.distributed by ssh-app-osmc’
dpkg-divert: error: rename involves overwriting ‘/etc/ssh/sshd_config’ with
different file ‘/etc/ssh/sshd_config.distributed’, not allowed
dpkg: error processing package ssh-app-osmc (–remove):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
ssh-app-osmc
E: Sub-process /usr/bin/dpkg returned an error code (1)

Does anyone know what I am doing wrong?

Thanks in advance!
Danno

My guess is that you’ve installed something that’s conflicting. What’s the content of your /etc/apt/sources.list

And of course, logs would help:

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

So, in summary:

  • activate the logging
  • reboot the OSMC device
  • reproduce the issue
  • upload the log set either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A
  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

Here is the content of my sources.list

deb Index of /debian stretch main contrib non-free

deb Index of /debian stretch-updates main contrib non-free

deb http://security.debian.org/ stretch/updates main contrib non-free

deb http://apt.osmc.tv stretch main

Here are the logs:

https://paste.osmc.tv/zagefenolo

It looks like you may have tried to un-install ssh (ssh-app-osmc). Is that the case?

You could try to install it again:

$ sudo apt install ssh-app-osmc

Are you using ssh to connect to your Pi now?

Yes I am SSH’d into it now but you are onto something. When I first started trying to get rsync installed, I tried to SSH into the OSMC with Putty. I got an error about not being able to agree on a key algorithm. So I tried to uninstall and reinstall SSH via OSMC Apps. Now when I look at OSMC apps, it indicates that SSH is NOT installed but clearly it is because I am SSH’d into it currently.

I will try to install it via terminal

You may have on old version of Putty. Make sure it’s up to date.

Trying to install it from terminal:

apt install ssh-app-osmc

Reading package lists… Done
Building dependency tree
Reading state information… Done
ssh-app-osmc is already the newest version (1.2.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/3168 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
root@basementosmc:/#

I can run it over and over but it still gives me the above message. Installing rsync is still giving me the same messages as well. If I try it via OSMC apps, it says it installs but then it doesn’t show installed.

Thanks,
Danno

Sorry, meant to mention that. Yes, upgrading Putty got me SSH’d into it but now its a weird deal where OSMC doesn’t think its installed…

what does sudo apt-get install -f do?

Here is the result of apt-get install -f

apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
ssh-app-osmc
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 38.9 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database … 25215 files and directories currently installed.)
Removing ssh-app-osmc (1.2.3) …
Removing ‘diversion of /etc/ssh/sshd_config to /etc/ssh/sshd_config.distributed by ssh-app-osmc’
dpkg-divert: error: rename involves overwriting ‘/etc/ssh/sshd_config’ with
different file ‘/etc/ssh/sshd_config.distributed’, not allowed
dpkg: error processing package ssh-app-osmc (–remove):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
ssh-app-osmc
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ok, I think we have seen this issue before. You can try
sudo apt-get install --reinstall ssh-app-osmc
but not sure if that succeed.

That did it! I can’t thank both of you enough for getting this resolved so quickly!

Thanks again!
Danno

Great!