"smbclient is not installed" Please help me

Hello,

This seems to be a common problem, but none of the threads I’ve read have helped.

I’m running an Ubuntu Server 17.04 virtual machine in Proxmox on a Dell R710. Following a fresh install of the operating system, I ran apt-get update/upgrade and installed Nextcloud using Snap.

I can access the WebGUI no problem. I run into the “smbclient” is not installed problem.

I have installed smbclient and php-smbclient. Reading through the Nextcloud documentation, I feel strongly that these should be the only necessary steps.

I’m getting frustrated as I’ve read a lot of threads that seem to suggest 9 versions of the same package for 1 of 7 Linux distros. Or editing config files seemingly at random. Then poof! Some unexplained solution worked after trying 15 things and rebooting.

I’ve seen some references to PHP versions. I’m running 7 so I’m not sure if there could be a problem there.

Any help is greatly appreciated! I moved from FreeNAS to Proxmox. FreeNAS had easy WebDAV setup and it’s integral to my home server.

Thank you

I corrected the problem by restoring a backup prior to any configuration and installed Nextcloud without the Snap package. SMB is working fine now. Now on to my next problem…

I installed a clean Ubuntu server 18.0.1 . During this Ubuntu installation I selected Nextcloud. (it appears Ubuntu then uses the snap version).

  • Nextcloud 13.0.5
  • PHP 7.2.7

After installation I then did the following:

# sudo apt install smbclient
# sudo add-apt-repository universe
# sudo apt install php-smblient
# sudo reboot now

It still shows: ““smbclient” is not installed. Mounting of “SMB / CIFS”, “SMB / CIFS using OC login” is not possible. Please ask your system administrator to install it.”

What did I do wrong here? Given the instructions and the use of standard packages: shouldn’t this just work?

Oops, I did find this:

It is indeed a bug and it needs to be fixed. unfortunately it has been open for almost 2 years now…

Solution below worked for me.

apt -y install smbclient cifs-utils libsmbclient-dev php-dev make

pecl install smbclient

echo ‘extension=smbclient.so’ >> /etc/php/7.4/fpm/php.ini

systemct restart php7.4-fpm

Make sure you replace the PHP version number with your current PHP version. Tested and works in Nextcloud Version 20.

I was so hopeful for this but it did not work today under Nextcloud Hub 6 (27.1.7)
with PHP 8.1. At least the php.ini file path was different that I found. It appeared to be /etc/php/8.1/cli/php.ini.
running the echo command, even with sudo, said permission was denied. So I “sudo nano” the file and just typed it in manually. rebooted my whole VM and no-go. NextCloud still says smbclient is not installed. I don’t understand why after so many years, NextCloud devs aren’t just baking smb into the snap by default. Every time I research this I hit so many dead ends and outdated information.

Well, it’s not implemented yet: Add samba (smb) support · Issue #60 · nextcloud-snap/nextcloud-snap · GitHub

Basically you have three options:

  • Mount the smb share outside of Nextcloud to /mnt/share or /media/share and then add it as “local” external storage.

  • Use Nextcloud AIO, which has built-in SMB support.

  • Install Nextcloud manually.

1 Like