NextCloud 12 on Qnap-TS-231


This is a brief guide on how to install nextcloud 12 on qnap-ts-231 with firmware [4.3.3], fortunately we already have a package available for installation, we can download it at this post on qnap forum, we download the universal version 12 package for our system but after this installation and launch it we will encounter an error that does not allow execution, because libxml2 is too old to run nextcloud.

How can we solve it? Simply installing a newer version of libxml2, how? We can get one via Entware-ng and after installation we can replace new libraries with old ones; below are summarized the instructions:

  1. install the Entware-ng
    • donwload the qpkg package from here
    • install it by the web interface
  2. install libxml2
    • login into the nas with ssh on admin account
    • install it, execute: opkg install libxml2
  3. replacement of libraries
    • Check which version of libxml2 is loaded: /usr/local/apache/bin/php -i | grep libXML
      In the output you may notice that the loaded library will still be the old 2.6.30

      [/mnt/HDA_ROOT/usr/lib] # /usr/local/apache/bin/php -i | grep libXML                                      
      libXML support => active
      libXML Compiled Version => 2.6.30
      libXML Loaded Version => 20630
      libXML streams => enabled
    • backup the old library files:
      mv /mnt/HDA_ROOT/usr/lib/libxml2.so /mnt/HDA_ROOT/usr/lib/libxml2.so.bk
      mv /mnt/HDA_ROOT/usr/lib/libxml2.so.2.6.30 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.6.30.bk
      mv /mnt/HDA_ROOT/usr/lib/libxml2.so.2 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.bk
      
    • move the file of the new libxml2 library (you may have to update the new library path according to your situation, for help try opkg files libxml2):
      cp /opt/lib/libxml2.so.2.9.4 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.9.4
      chmod 644 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.9.4
      ln -s /mnt/HDA_ROOT/usr/lib/libxml2.so.2.9.4 /mnt/HDA_ROOT/usr/lib/libxml2.so.2
      ln -s /mnt/HDA_ROOT/usr/lib/libxml2.so.2 /mnt/HDA_ROOT/usr/lib/libxml2.so
      
    • Check which version of libxml2 is now loaded: /usr/local/apache/bin/php -i | grep libXML
      if there are no errors we can see that the new version of libxml2 is now loaded:

      [/mnt/HDA_ROOT/usr/lib] # /usr/local/apache/bin/php -i | grep libXML                                           
      libXML support => active
      libXML Compiled Version => 2.6.30
      libXML Loaded Version => 20904
      libXML streams => enabled
      
  4. restart web server
    • restart it, execute: /etc/init.d/Qthttpd.sh restart

that’s all, to support consult the qnap forum. thx

Annunci

4 pensieri su “NextCloud 12 on Qnap-TS-231

  1. HI,

    I follow your steps and when I type “/usr/local/apache/bin/php -i | grep libXML” in the end of Step 3, it shows

    /usr/local/apache/bin/php: /lib/libc.so.6: version `GLIBC_2.7′ not found (required by /usr/lib/libxml2.so.2)

    What can I do?

    Thanks!

    1. hi, weird, can you give some more information? What is your nas? What software version is installed? i’m with 4.3.3.0404 and works well;
      can you paste here the result of this command?

      ldd --version
      
      opkg list-installed
      
      ls -la /usr/lib/ | grep xml
      1. Hi, My nas is HS-210, with 4.3.3.0404 Build 20171213.
        And My libxml2.so path is not /mnt/HDA_ROOT/usr/lib/, is /mnt/ext/usr/lib/.

        Below are the command results. Thanks!

        /usr/local/apache/bin/php -i | grep libXML
        /usr/local/apache/bin/php: /lib/libc.so.6: version `GLIBC_2.7' not found (required by /usr/lib/libxml2.so.2)
        
        ldd --version
        ldd (GNU libc) 2.5
        Copyright (C) 2006 Free Software Foundation, Inc.
        This is free software; see the source for copying conditions.  There is NO
        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
        Written by Roland McGrath and Ulrich Drepper.
        
        opkg list-installed
        entware-opt - 222108-5
        findutils - 4.6.0-1
        ldconfig - 2.23-6
        libc - 2.23-6
        libgcc - 6.3.0-6
        libpthread - 2.23-6
        librt - 2.23-6
        libssp - 6.3.0-6
        libstdcpp - 6.3.0-6
        libxml2 - 2.9.5-1
        locales - 2.23-6
        opkg - 2011-04-08-9c97d5ec-17a
        terminfo - 6.0-1c
        zlib - 1.2.11-1
        
        ls -la /usr/lib/ | grep xml
        lrwxrwxrwx    1 admin    administ        16 Dec 13 11:49 libixml.so -> libixml.s                                                                                                                                                             o.2.0.8*
        lrwxrwxrwx    1 admin    administ        16 Dec 13 11:49 libixml.so.2 -> libixml                                                                                                                                                             .so.2.0.8*
        -rwxr-xr-x    1 admin    administ     32776 Dec 13 10:55 libixml.so.2.0.8*
        lrwxrwxrwx    1 admin    administ        49 Dec 15 12:13 libucxmlcfg.so -> /shar                                                                                                                                                             e/HDA_DATA/.qpkg/qusbcam2/lib/libucxmlcfg.so*
        lrwxrwxrwx    1 admin    administ        29 Dec 24 02:07 libxml2.so -> /mnt/ext/                                                                                                                                                             usr/lib/libxml2.so.2
        lrwxrwxrwx    1 admin    administ        33 Dec 24 02:07 libxml2.so.2 -> /mnt/ex                                                                                                                                                             t/usr/lib/libxml2.so.2.9.5
        -rw-r--r--    1 admin    administ   1920700 Dec 13 10:55 libxml2.so.2.6.30.bk
        -rw-r--r--    1 admin    administ   1154024 Dec 24 02:07 libxml2.so.2.9.5
        lrwxrwxrwx    1 admin    administ        17 Dec 13 11:49 libxml2.so.2.bk -> libx                                                                                                                                                             ml2.so.2.6.30@
        lrwxrwxrwx    1 admin    administ        12 Dec 13 11:49 libxml2.so.bk -> libxml                                                                                                                                                             2.so.2
        lrwxrwxrwx    1 admin    administ        14 Dec 15 12:16 libxmlcfg.so -> libxmlc                                                                                                                                                             fg.so.0*
        lrwxrwxrwx    1 admin    administ        16 Dec 15 12:16 libxmlcfg.so.0 -> libxm                                                                                                                                                             lcfg.so.0.0*
        lrwxrwxrwx    1 admin    administ        93 Dec 15 12:16 libxmlcfg.so.0.0 -> /sh                                                                                                                                                             are/HDA_DATA/.qpkg/SurveillanceStation/.nvr_root_target/.nvr_root/usr/lib/libxml                                                                                                                                                             cfg.so.0.0*
        lrwxrwxrwx    1 admin    administ        22 Dec 13 11:49 libxmlrpc-epi.so -> lib                                                                                                                                                             xmlrpc-epi.so.0.0.3
        lrwxrwxrwx    1 admin    administ        22 Dec 13 11:49 libxmlrpc-epi.so.0 -> l                                                                                                                                                             ibxmlrpc-epi.so.0.0.3
        -rw-r--r--    1 admin    administ     62104 Dec 13 10:55 libxmlrpc-epi.so.0.0.3
        
  2. seems all in place except for the old version of libc used, I would try to run the command forcing to use the most recent library that I see installed through opkg, something like this below:

    export LD_LIBRARY_PATH=(path to more recent libc):$LD_LIBRARY_PATH
    /usr/local/apache/bin/php -i | grep libXML
    

    change the (path to more recent libc) with the absolute path of the recent libc installed;
    however I advise you if you have any other problems to contact the qnap community forum.
    http://forum.qnap.com

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

w

Connessione a %s...