client_theming icon indicating copy to clipboard operation
client_theming copied to clipboard

Install on Ubuntu 16.04 from Ubuntu PPA, client doesn't start

Open thom-github opened this issue 7 years ago • 25 comments

I was asked here https://help.nextcloud.com/t/cant-install-from-ubuntu-ppa/14392/8

to create a new issue so that I could attach the output of strace -f -o nextcloud.trace nextcloud so that's what I'm doing here.

tdlr; I had an old version of the nextcloud-client on my PC, can't remember where and how I got it, now added PPA, installed 2.3.1 but it won't start, shows

libocsync.so.0: cannot open shared object file: No such file or directory

nextcloud-trace.txt

thom-github avatar Jun 25 '17 15:06 thom-github

So the trace contains this line:

20029 open("/usr/lib/x86_64-linux-gnu/nextcloud/libocsync.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

which shows that it tries to open the file with the correct path, but it fails. Since you listed in the original post this file, I can only think that as this file is (or should be) a symlink, it either points to a wrong path or the actual library file is missing.

Could you, please, check the /usr/lib/x86_64-linux-gnu/nextcloud/ directory? It should contain three files:

  1. libocsync.so which should be a symlink pointing to libocsync.so.0,
  2. libocsync.so.0 which should be a symlink pointing to libocsync.so.2.3.1, and
  3. libocsync.so.2.3.1 which should be a regular file, the actual library.

ivaradi avatar Jun 25 '17 17:06 ivaradi

Indeed, the first symlink was missing, so it read

    ls -la /usr/lib/x86_64-linux-gnu/nextcloud

lrwxrwxrwx   1 root root     18 Mai 14 22:05 libocsync.so.0 -> libocsync.so.2.3.1
-rw-r--r--   1 root root  80696 Mai 14 22:05 libocsync.so.2.3.1

I added the symlink like this

sudo ln -s /usr/lib/x86_64-linux-gnu/nextcloud/libocsync.so.0 /usr/lib/x86_64-linux-gnu/nextcloud/libocsync.so

So, ls now shows: `ls -la /usr/lib/x86_64-linux-gnu/nextcloud

lrwxrwxrwx 1 root root 50 Jun 25 19:35 libocsync.so -> /usr/lib/x86_64-linux-gnu/nextcloud/libocsync.so.0 lrwxrwxrwx 1 root root 18 Mai 14 22:05 libocsync.so.0 -> libocsync.so.2.3.1 -rw-r--r-- 1 root root 80696 Mai 14 22:05 libocsync.so.2.3.1 `

Still, when running nextcloud

I get

nextcloud: error while loading shared libraries: libocsync.so.0: cannot open shared object file: No such file or directory

thom-github avatar Jun 25 '17 17:06 thom-github

Oh, sorry, it seems I checked the nextcloud.trace file generated by my running of the client :)

Yours one contains lines like this:

2755  open("$LD_LIBRARY_PATH/tls/libocsync.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
2755  open("$LD_LIBRARY_PATH/x86_64/libocsync.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
2755  open("$LD_LIBRARY_PATH/libocsync.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

It seems that something overrides the RPATH setting in the binary, most likely the LD_LIBRARY_PATH environment variable (which is probably set incorrectly, as it should not contain a string like $LD_LIBRARY_PATH). Could you, please, check this variable? Or perhaps upload the list of your environment variables (with sensitive details, if any, removed, of course)?

ivaradi avatar Jun 26 '17 06:06 ivaradi

Ok, I'll try to work this one out, sorry if this isn't what you need.

I checked sudo nano /etc/ld.so.conf which is empty except for an include to /etc/ld.so.conf.d/*.conf

Here's the content of that directory:

fakeroot-x86_64-linux-gnu.conf x86_64-linux-gnu.conf i386-linux-gnu.conf x86_64-linux-gnu_EGL.conf i386-linux-gnu_EGL.conf x86_64-linux-gnu_GL.conf i386-linux-gnu_GL.conf zz_i386-biarch-compat.conf libc.conf

Do I need to show you the contents of any of those files? Sorry, there's a million-and-one pages on the net about SETTING LD_Library_path, but not one I could find about SHOWING. :)

thom-github avatar Jun 26 '17 07:06 thom-github

E.g. echo $LD_LIBRARY_PATH in your shell (which you start the client from)

The contents of those files may be interesting, though their names seem standard, so unless their contents are overwritten somehow, they should be OK. Also the output of ldconfig -p might be useful as well.

Actually, I found that LD_LIBRARY_PATH does (or should) not override RPATH, but just in case...

ivaradi avatar Jun 26 '17 07:06 ivaradi

Output: echo $LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu

thom-github avatar Jun 26 '17 08:06 thom-github

OK, then try to start the client with the variable unset, e.g.:

/usr/bin/env LD_LIBRARY_PATH= nextcloud

ivaradi avatar Jun 26 '17 08:06 ivaradi

/usr/bin/env LD_LIBRARY_PATH= nextcloud nextcloud: error while loading shared libraries: libocsync.so.0: cannot open shared object file: No such file or directory

thom-github avatar Jun 26 '17 09:06 thom-github

Well, I am baffled at this point. I am quite sure it is some misconfiguration problem, which results in the dynamic loader to use those funny search paths I listed a few comments above. But I could not find any hint where they may come from, as the dynamic loader uses the RPATH attribute in the executable as the first path to search, which we have established to be present. Also, ldd finds the library, even though it also uses the dynamic loader...

So I am out of ideas at this point.

ivaradi avatar Jun 26 '17 12:06 ivaradi

I'm an absolute noob in those things, but I can't just copy / move / rename the library in any way, shape or form to make this work?

thom-github avatar Jun 26 '17 12:06 thom-github

Yes, that could work. For example if you copy or move it into the directory /usr/local/lib/x86_64-linux-gnu/, it will probably work, since that is one of the locations searched according to the trace.

ivaradi avatar Jun 26 '17 17:06 ivaradi

Alight, this is different. I tried to symlink the .2.3.1 lib into /usr/local/lib like this:

sudo ln -s /usr/lib/x86_64-linux-gnu/nextcloud/libocsync.so.2.3.1 /usr/local/lib/x86_64-linux-gnu/libnextcloudsync.so.0

This is what the directory now looks like:

ls -l

lrwxrwxrwx 1 root root      21 Nov 22  2016 libnextcloudsync.so -> libnextcloudsync.so.0
lrwxrwxrwx 1 root root      54 Jun 27 08:25 libnextcloudsync.so.0 -> /usr/lib/x86_64-linux-gnu/nextcloud/libocsync.so.2.3.1
-rw-r--r-- 1 root root 2241656 Nov 22  2016 libnextcloudsync.so.2.2.4

But, when I try to run nextcloud I get:

nextcloud: symbol lookup error: nextcloud: undefined symbol: _ZN3OCC15HttpCredentials16staticMetaObjectE

thom-github avatar Jun 27 '17 06:06 thom-github

The symlink should be called libocsync.so.0 instead of libnextcloudsync.so.0.

ivaradi avatar Jun 27 '17 06:06 ivaradi

I can't get it to work, despite trying various combinations (yes, I'm fumbling in the dark, sorry). This is the last thing I tried, boiling it down to the "essentials":

/usr/local/lib/x86_64-linux-gnu$ ls -l

lrwxrwxrwx 1 root root      18 Jun 27 09:08 libocsync.so.0 -> libocsync.so.2.3.1
-rw-r--r-- 1 root root   80696 Jun 27 09:07 libocsync.so.2.3.1

nextcloud: symbol lookup error: nextcloud: undefined symbol: _ZNK3OCC15HttpCredentials7changedEPNS_19AbstractCredentialsE

As you can see, another error.... I know this might sound basic, but can you tell me exactly what needs to be where?

thom-github avatar Jun 27 '17 07:06 thom-github

No chance for one last hoorah of help? :)

thom-github avatar Jul 02 '17 15:07 thom-github

Well, as I wrote, I am totally baffled by these errors. For example, the undefined symbol in the last error message does not even exist in any of the binaries in the PPA packages or in the source for that matter. Though it does exist in the 2.2.4 version. I guess the client files from your previous attempts got mixed up with the PPA files somehow.

Maybe, if you could remove all Nextcloud and ownCloud packages, and all other files from your previous manual attempts and then reinstall the PPA packages, it may help.

ivaradi avatar Jul 05 '17 05:07 ivaradi

I'm having a similar issue. I reinstalled nextcloud client but issue is persisting.

nextcloud: symbol lookup error: nextcloud: undefined symbol: _ZNK3OCC15HttpCredentials7changedEPNS_19AbstractCredentialsE

ronantreacy avatar Jul 07 '17 11:07 ronantreacy

It gets a bit weird at this point. After trying (and failing) at installing Arch with just half an eye on it, I went back to Ubuntu, 16.04 as before. Root partition got formatted (twice, in the process), but /home was kept. I just finished installing Nextcloud again, so I tried my hand at the desktop client. I did sudo add-apt-repository ppa:nextcloud-devs/client sudo apt-get update sudo apt install nextcloud-client

Then I tried to start NC from the Gnome-Shell, but on clicking the icon, nothing happend. So I started from console, and get this:

nextcloudnextcloud: error while loading shared libraries: libocsync.so.0: cannot open shared object file: No such file or directory

Back to square 1, am I? What in the nine hells is happening?

thom-github avatar Jul 15 '17 19:07 thom-github

It gets a bit weird at this point. After trying (and failing) at installing Arch with just half an eye on it, I went back to Ubuntu, 16.04 as before. Root partition got formatted (twice, in the process), but /home was kept. I just finished installing Nextcloud again, so I tried my hand at the desktop client. I did

sudo add-apt-repository ppa:nextcloud-devs/client
sudo apt-get update
sudo apt install nextcloud-client

Then I tried to start NC from the Gnome-Shell, but on clicking the icon, nothing happend. So I started from console, and get this:

nextcloud

nextcloud: error while loading shared libraries: libocsync.so.0: cannot open shared object file: No such file or directory

Back to square 1, am I? What in the nine hells is happening?

thom-github avatar Jul 15 '17 19:07 thom-github

Perhaps something remained in your home directory that causes this failure. You can try with a different user or to reinstall without keeping /home (e.g. do not use the existing /home partition in the new installation).

ivaradi avatar Jul 20 '17 10:07 ivaradi

Months later... My RPi broke (used as a cat toilet), I fiddled with OC, back to NC, unhappy, found a premade image that has what I need, works, happy. Except: THIS is still keeping me from synching, the same problem (which, btw, plagues me on the OC sync client, as well).

Since, in the meantime, I had added another user on this machine for my mom, I went and tried it with her user, and what do you know: the sync client comes up beautifully!

So, any chance you could let me know what files / directories I ought to clean up on my own user to get rid of the junk blocking me? I'd be ever so grateful, honestly.

thom-github avatar Oct 03 '17 17:10 thom-github

I really am not knowledgeable about the internals of the OC/NC client to be able to tell you anything definite.

However, in a similar situation I would create a new directory in my home directory, and move everything there that does not look to belong to some specific application for sure. If the client starts to work , I would gradually move everything back until the client stops working again. After each "portion" I moved back, I would at least log out, kill all my remaining processes (logging in from a text screen) and would log back to check if the client still works.

If, after moving stuff to the new directory, the client still does not start, I would move more things.

I would also clean up any login scripts (e.g. .profile, .bash_profile, .bashrc, depending on the shell used) after copying the originals to the directory.

ivaradi avatar Oct 03 '17 18:10 ivaradi

Thanks for the reply ivaradi.

I found this, so I now know the location of the config files. And indeed I had both a ~/.local/share/data/Nextcloud as well as ~/.local/share/data/ownCloud

Unfortunately, moving both to "name-old" didn't do anything, the error persists.

As for moving the data out and parcelling it back in to the sync dir: When I switched to OC I renamed my root sync dir anyway, so the NC config doesn't know where to currently find my stuff anyway. So that can't be helpful, I'm sorry to say.

Quite at a loss here.

thom-github avatar Oct 03 '17 18:10 thom-github

Hi

did you solve your problem? something similar happens on my pc after the update of the nextcloud-client (or Ubuntu - I'm not sure where is the source of this issue).

The client does not start automatically when the user session is opened and the command line nextcloud & returns the error nextcloud: symbol lookup error: nextcloud: undefined symbol: _ZN3OCC13SyncJournalDb10makeDbNameERK7QStringRK4QUrlS3_S3_

:$ sudo apt-cache policy nextcloud-client
nextcloud-client:
  Installé : 2.3.3-20171224.060956~xenial1
  Candidat : 2.3.3-20171224.060956~xenial1
 Table de version :
 *** 2.3.3-20171224.060956~xenial1 500
        500 http://ppa.launchpad.net/nextcloud-devs/client/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3.3-20171115.140120~xenial1 500
        500 http://ppa.launchpad.net/nextcloud-devs/client-beta/ubuntu xenial/main amd64 Packages
:$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial

I tried different things like:

  • removing the application data of the client. /home//.local/share/data/Nextcloud. The application start and ask me the URL and credential for the connection to the server but failed just after with the same error.
  • install alpha version but I get another error: nextcloud: symbol lookup error: nextcloud: undefined symbol: _ZNK3OCC15HttpCredentials10createQNAMEv
  • completly remove the application (sudo apt autoremove nextcloud-client) and reinstall the stable version.

The nextcloud-client does not want to start.

Best Regards.

Vince4Git avatar Jan 30 '18 08:01 Vince4Git

Hi. I had the same problem. I found this : https://help.nextcloud.com/t/nextcloud-app-fehler-bei-start/12541 and I tried sudo apt-get install libqt5keychain0=0.5.0-1build1~gcc5.1 And Nextcloud-client worked.

ghisd88 avatar Feb 23 '18 20:02 ghisd88