mounting pCloud drive on LibreELEC - rPi 3b+

  • Hello everyone,

    I compiled the pcloudcc CLI client for pCloud on Raspberry Pi OS and used it successfully there to mount the cloud drive and play music from there with kodi.

    I would like to do the same thing for libreELEC, but it looks like fuse is not part of busybox, so not sure if it is a possibility at all.

    The os build is minimal so no apt-get and the rest...I tried to go through the documentation on making an add-on and cannot make much sense of it.

    Any views?

    Thanks in advance

  • there's pcloudcc in /usr/local/bin and pcloudcc_lib.so, how do I tell pcloudcc where the shared libraries are?

    I tried copying both in the same directory (/storage/backup) and amending PATH, but no joy

    raspi:~/backup # PATH=/usr/bin:/usr/sbin:/storage/backup

    raspi:~/backup # echo $PATH

    /usr/bin:/usr/sbin:/storage/backup

    raspi:~/backup # ./pcloudcc -h

    ./pcloudcc: error while loading shared libraries: libpcloudcc_lib.so: cannot open shared object file: No such file or directory

    raspi:~/backup #

    Should I amend the LD_LIBRARY_PATH to include the libpcloudcc_lib.so?

    Thanks

  • I'm not sure if that's an error about finding libpcloudcc_lib.so or libpcloudcc_lib.so is dynamically linked against other things which are missing and thus it fails to open the file which it found. There's no harm in experimenting with LD_LIBRARY_PATH so give it a try. You can also share the output from "ldd /storage/backup/libpcloudcc_lib.so" to see whether it's linked against anything missing.

  • looks like you are right about linked libraries not being found... here's the output from ldd of libcloudcc_lib.so.

    libfuse.so.2 is missing, not sure how to fix that.

    I tried to copy it to the same directory but libcloudcc_lib.so is expecting it elsewhere.


    raspi:/usr # ldd /storage/backup/libpcloudcc_lib.so

    linux-vdso.so.1 => linux-vdso.so.1 (0x7eef2000)

    /usr/lib/libarmmem-v7l.so => /usr/lib/libarmmem-v7l.so (0x76ca0000)

    libfuse.so.2 => not found

    libudev.so.1 => /usr/lib/libudev.so.1 (0x76c71000)

    libz.so.1 => /usr/lib/libz.so.1 (0x76fdf000)

    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x76aa0000)

    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x76a60000)

    libc.so.6 => /usr/lib/libc.so.6 (0x768f0000)

    /usr/lib/ld-linux-armhf.so.3 => /usr/lib/ld-linux-armhf.so.3 (0x76fb7000)

    libm.so.6 => /usr/lib/libm.so.6 (0x76880000)

  • libfuse and libfuse3 are included in the network-tools addon package.

    libfuse is included in the system-tools addon package.

    You will need to reboot after the addon is installed

  • Thank you Heitbaum, now ldd shows that all the linked libraries can be found.

    Amending the LD_LIBRARY_PATH to include the libpcloudcc_lib.so gets pcloudcc to work.

    Thank you!

    LD_LIBRARY_PATH='/usr/bin:/usr/sbin:/storage/.kodi/addons/virtual.network-tools/bin:/storage/backup'

    raspi:~/backup # ./pcloudcc -h

    pCloud console client v.2.0.1

    Allowed options:

    -h [ --help ] produce help message

    -u [ --username ] arg pCloud account name

    -p [ --password ] Ask pCloud account password

    -c [ --crypto ] Ask crypto password

    -y [ --passascrypto ] arg Use user password as crypto password also.

    -d [ --daemonize ] Daemonize the process.

    -o [ --commands ] Parent stays alive and processes commands.

    -m [ --mountpoint ] arg Mount point where drive to be mounted.

    -k [ --commands_only ] Daemon already started pass only commands

    -n [ --newuser ] Switch if this is a new user to be registered.

    -s [ --savepassword ] Save password in database.

    So to summarise for whoever comes next:

    - compile pcloudcc on Raspberry Pi OS changing the setting for the correct processor

    - copy pcloudcc and libpcloudcc_lib.so to somewhere in the storage filesystem

    - install the network tools and system tools add-ons

    - amend LD_LIBRARY_PATH to include the pcloud library

    - reboot

    Thanks again for your help!

  • libfuse and libfuse3 are included in the network-tools addon package.

    libfuse is included in the system-tools addon package.

    You will need to reboot after the addon is installed

    Hello,

    Thank you very much and for the question and for the replies.

    I followed the procedure very carefully and after importing pcloudcc and libpcloudcc_lib.so and updating the LD_LIBRARY_PATH, I still receive the message "libfuse.so.2 => not found".

    This does not seem strange, since, after checking the relevant directories under /.kodi/addons, there is no trace of libfuse.so.2 anymore. What I can see is a list of items such as fusermount and mount.fuse.

    I do not see how to switch from the two approaches (libfuse.so.2 in the raspberry environment and fusermount in the libreelec environment.

    Many thanks in advance for any clairification regarding this issue

  • In LE12 we moved the libraries to lib.private to keep them from colliding and cluttering the LD_LIBRARY_PATH.


    nuc12:~ # find .kodi/addons/ | grep libfuse.so
    .kodi/addons/virtual.system-tools/lib.private/libfuse.so
    .kodi/addons/virtual.system-tools/lib.private/libfuse.so.2
    .kodi/addons/virtual.system-tools/lib.private/libfuse.so.2.9.9
    .kodi/addons/virtual.network-tools/lib.private/libfuse.so
    .kodi/addons/virtual.network-tools/lib.private/libfuse.so.2
    .kodi/addons/virtual.network-tools/lib.private/libfuse.so.2.9.9

    the rpath has been updated on the binaries

    nuc12:~ # ldd .kodi/addons/virtual.system-tools/bin/mtpfs
    linux-vdso.so.1 (0x00007f34ba525000)
    libfuse.so.2 => /storage/.kodi/addons/virtual.system-tools/bin/../lib.private/libfuse.so.2 (0x00007f34ba4e1000)
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f34ba2ec000)
    libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x00007f34ba2d7000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f34ba119000)
    libudev.so.1 => /usr/lib/libudev.so.1 (0x00007f34ba0ca000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f34ba527000)

    The code that does this is: https://github.com/LibreELEC/Libr…package.mk#L194