How to Compile Nextcloud Linux Client on Ubuntu 16.04, Ubuntu 16.10

Nextcloud team released a Nexcloud client for Linux which is based on owncloud client. But it’s a source package. No official binary package is available right now. This tutorial is going to show you how to compile Nextcloud Linux client on Ubuntu 16.04 and Ubuntu 16.10 so that you can sync files between your desktop and Nextcloud server.

The Nextcloud graphical client is tested on Ubuntu 16.04 and 16.10 desktop. The command line client is tested on a Ubuntu 16.04 VPS. Both works perfectly.

Compiling Nextcloud Linux Client

First, install git version control tool and the CMake build system generator.

sudo apt install git cmake

Clone the Nextcloud Linux client Git repository

git clone https://github.com/nextcloud/client_theming.git

cd client_theming

Update submodule.

git submodule update --init --recursive

Next, we’re going to install build dependencies of owncloud-client from Ubuntu repository. The owncloud-client package is in Ubuntu universe repository.

Enable Ubuntu universe source repository by opening /etc/apt/sources.list file and uncommenting the following two lines. Replace xenial with yakkety if you are using Ubuntu 16.10.

deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates universe

Save and close the file. Then update local package index and install build dependencies.

sudo apt update

sudo apt build-dep owncloud-client

Compile and Install

mkdir build-linux

cd build-linux

cmake -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client

make

sudo make install

Two executables will be installed under /usr/local/bin/ directory: nextcloud and nextcloudcmd. You can see that during the installation, the runtime path of these two executables has been set to /usr/local/lib/x86_64-linux-gnu/nextcloud.

In order to run the Nextcloud client, we need to add the above non-standard library directory to a config file.

sudo nano /etc/ld.so.conf.d/x86_64-linux-gnu.conf

Add the following line to the end of the file.

/usr/local/lib/x86_64-linux-gnu

Save and close the file. Then rebuild shared library cache with the following command:

sudo ldconfig

Now you can type in nextcloud in the terminal to launch the graphical Nextcloud Linux client.

nextcloud

nextcloud client ubuntu

The Nextcloud client automatically add an entry in startup applications so that it will autostart at boot time.

How to use Nextcloud Linux Command Line Client

To use nextcloudcmd, you provide the local directory and the remote URL like below:

nextcloudcmd /home/username/nextcloud https://nextcloud.your-domain.com

The client will prompt you to enter your Nextcloud username and password. You can also use the -u and -p option to submit username and password.

nextcloudcmd -u <username> -p <password> /home/username/nextcloud https://nextcloud.your-domain.com

Once the synchronization is done, the command line client will exit.

Use OwnCloud Client to Sync your Nextcloud Files

If for any reason the above method doesn’t work for you, then you can always use the Owncloud client to sync your Nextcloud files. Install it by executing the following command:

sudo apt install owncloud-client owncloud-client-cmd

That’s it!

I hope this tutorial helped you compile Nextcloud Linux client on Ubuntu 16.04 and 16.10. As always, if you found this post useful, then subscribe to our free newsletter. You can also follow us on Google+Twitter or like our Facebook page.

Rate this tutorial
[Total: 8 Average: 4.6]

One Response to “How to Compile Nextcloud Linux Client on Ubuntu 16.04, Ubuntu 16.10

  • zerophear 33
    6 years ago

    ubuntu@ubuntu:~/client_theming/build-linux$ cmake -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client
    — The C compiler identification is GNU 5.4.0
    — The CXX compiler identification is unknown
    — Check for working C compiler: /usr/bin/cc
    — Check for working C compiler: /usr/bin/cc — works
    — Detecting C compiler ABI info
    — Detecting C compiler ABI info – done
    — Detecting C compile features
    — Detecting C compile features – done
    CMake Error at CMakeLists.txt:5 (project):
    No CMAKE_CXX_COMPILER could be found.

    Tell CMake where to find the compiler by setting either the environment
    variable “CXX” or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here