Debian 9 client unsupported client version but followed official instruction

I followed instructions at https://software.opensuse.org/download/package?project=isv:ownCloud:desktop&package=owncloud-client but it only installed owncloud-client 2.2.4 which gives unsupported version when I try to connect to our owncloud X server.

source
deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_9.0/ /

root@ep-dev:/etc/apt/sources.list.d# apt-get install owncloud-client
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
owncloud-client
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/856 kB of archives.
After this operation, 2,370 kB of additional disk space will be used.
Selecting previously unselected package owncloud-client.
(Reading database … 275758 files and directories currently installed.)
Preparing to unpack …/owncloud-client_2.2.4+dfsg-2_amd64.deb …
Unpacking owncloud-client (2.2.4+dfsg-2) …
Processing triggers for mime-support (3.60) …
Processing triggers for desktop-file-utils (0.23-1) …
Processing triggers for man-db (2.7.6.1-2) …
Processing triggers for hicolor-icon-theme (0.15-1) …
Setting up owncloud-client (2.2.4+dfsg-2) …

We had some hiccups today, but now everything should work again. I performed a quick check using Docker to verify:

docker run -ti --rm debian:9

.

root@d68b22308796:/# owncloudcmd --version
ownCloud version 2.5.4 (build 515)
Git revision fcdf542869a23b1f5b5ef247886fc858f96c76e2
Using Qt 5.12.1, built against Qt 5.12.1
Using 'OpenSSL 1.1.0j  20 Nov 2018'
root@d68b22308796:/# history
    1  apt update && apt install wget -y && apt-get install gnupg2 --no-install-recommends -y
    2  wget -nv https://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_9.0/Release.key -O Release.key
    3  apt-key add - < Release.key
    4  apt-get update
    5  echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_9.0/ /' > /etc/apt/sources.list.d/isv:ownCloud:desktop.list
    6  apt-get update
    7  apt-get install owncloud-client
    8  owncloudcmd --version
    9  history

Doesn’t seem to of made any difference, still same error and version.

ben@ep-dev ~/malmesburyonline (master) $ sudo apt-get update
[sudo] password for ben: 
Hit:1 http://deb.debian.org/debian stretch-updates InRelease
Hit:2 http://security.debian.org/debian-security stretch/updates InRelease                                                                 
Hit:3 http://deb.debian.org/debian stretch-backports InRelease                                                                             
Ign:4 http://deb.debian.org/debian stretch InRelease                                                                                       
Hit:5 http://deb.debian.org/debian stretch Release                                                        
Hit:6 http://packages.microsoft.com/repos/vscode stable InRelease                                                         
Hit:7 http://ftp.us.debian.org/debian sid InRelease                                                                       
Hit:8 https://repo.skype.com/deb stable InRelease                                        
Ign:9 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_9.0  InRelease
Hit:10 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease                  
Get:11 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_9.0  Release [1,026 B]
Get:12 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_9.0  Release.gpg [481 B]
Get:14 http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_9.0  Packages [18.5 kB]
Fetched 20.0 kB in 0s (21.8 kB/s)   
Reading package lists... Done
ben@ep-dev ~/malmesburyonline (master) $ sudo apt-get remove owncloud-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libowncloudsync0 libqt5keychain1 owncloud-client-l10n
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
      owncloud-client
    0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
    After this operation, 2,370 kB disk space will be freed.
    Do you want to continue? [Y/n] 
    (Reading database ... 274950 files and directories currently installed.)
    Removing owncloud-client (2.2.4+dfsg-2) ...
    Processing triggers for mime-support (3.60) ...
    Processing triggers for desktop-file-utils (0.23-1) ...
    Processing triggers for man-db (2.7.6.1-2) ...
    Processing triggers for hicolor-icon-theme (0.15-1) ...
    ben@ep-dev ~/malmesburyonline (master) $ sudo apt-get install owncloud-client
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      owncloud-client
    0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
    Need to get 0 B/856 kB of archives.
    After this operation, 2,370 kB of additional disk space will be used.
    Selecting previously unselected package owncloud-client.
    (Reading database ... 274934 files and directories currently installed.)
    Preparing to unpack .../owncloud-client_2.2.4+dfsg-2_amd64.deb ...
    Unpacking owncloud-client (2.2.4+dfsg-2) ...
    Processing triggers for mime-support (3.60) ...
    Processing triggers for desktop-file-utils (0.23-1) ...
    Processing triggers for man-db (2.7.6.1-2) ...
    Processing triggers for hicolor-icon-theme (0.15-1) ...
    Setting up owncloud-client (2.2.4+dfsg-2) ...

Did you try the suggested sudo apt autoremove ? I could imagine that a libowncloudsync0 package of 2.2.4 is not compatible with 2.5.4 and thus the system can only choose 2.2.4 while one of the old 2.2.4 fragments are still around.

When you say ‘still the same error’ – which exact error message do you get?

After you registered the repository, can you install one of the other packages from there? E.g.
sudo apt-get install ocqt5121-libqt5gui5

You can also try to insist on the exact version number like this:
sudo apt-get install owncloud-client=2.5.4.11654+oc-515

One of these commands might give more explanation why it does not want to install 2.5.4, I hope.

In any case, I assume that it works for other Debian 9 systems, as our test-suite installs flawless:

If i’m facing such issues i’m always checking the status and the “installation candidates” via “apt-cache policy owncloud-client” to see why other versions are pulled in.