smbclient for Nextcloud 12

Status
Not open for further replies.

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
I have nextcloud 12 installed in a jail, with php 7.1 I do not have smbclient installed according to my nextcloud gui. I read a post in a thread on this site (which I seem to be unable to find again) that suggested installing pecl-smbclient using ports in order to not have the the php 5.6 dependencies install and remove php 7.1 parts. I followed that suggestion using :

cd /usr/ports/net/pecl-smbclient/ make config-recursive install (or something very similar to this, I can no longer seem to find the post that suggested this) and it seemed to install properly. I restarted php-fpm as was also suggested to do. I also restarted apache24, and did a reboot of my freenas server (in hopes of getting smbclient to take effect)

My nextcloud web gui still shows that smbclient isn't installed.

I am fairly new to all of this, so I am unsure of how to proceed next in order to have smbclient become effective, or if I havn't done the proper steps in order for it to be installed.
 
Last edited:
D

dlavigne

Guest
Paste the output of pkg info |grep smb within code tags (run that command within the jail).
 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
Paste the output of pkg info |grep smb within code tags (run that command within the jail).

no output at all

Code:
root@nextcloud:~ # pkg info | grep smb
root@nextcloud:~ #

 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
This is what was installed it seems (not sure if this is helpful or not)

Code:
root@nextcloud:/usr/ports/net/pecl-smbclient # ls -l
total 22
-rw-r--r--  1 100  100  433 Apr 10 20:01 Makefile
-rw-r--r--  1 100  100  164 Feb 13  2017 distinfo
-rw-r--r--  1 100  100  183 May 19  2016 pkg-descr
drwxr-xr-x  3 root  wheel  9 Sep 10 17:29 work
root@nextcloud:/usr/ports/net/pecl-smbclient # cd ./work
root@nextcloud:/usr/ports/net/pecl-smbclient/work # ls -l
total 20
-rw-r--r--  1 root  wheel  0 Sep 10 17:29 .extract_done.smbclient._usr_local
-rw-r--r--  1 root  wheel  207 Sep 10 17:29 .license-catalog.mk
-rw-r--r--  1 root  wheel  81 Sep 10 17:29 .license-report
-rw-r--r--  1 root  wheel  0 Sep 10 17:29 .license_done.smbclient._usr_local
-rw-r--r--  1 root  wheel  0 Sep 10 17:29 .patch_done.smbclient._usr_local
-rw-r--r--  1 root  wheel  5068 Feb 10  2017 package.xml
drwxr-xr-x  3 root  wheel  10 Sep 10 17:29 smbclient-0.9.0
root@nextcloud:/usr/ports/net/pecl-smbclient/work # cd ./smbclient-0.9.0
root@nextcloud:/usr/ports/net/pecl-smbclient/work/smbclient-0.9.0 # ls -l
total 72
-rw-r--r--  1 root  wheel  1440 Feb 10  2017 LICENSE
-rw-r--r--  1 root  wheel  25794 Feb 10  2017 README.md
-rw-r--r--  1 root  wheel  2536 Feb 10  2017 config.m4
-rw-r--r--  1 root  wheel  4871 Feb 10  2017 php_smbclient.h
-rw-r--r--  1 root  wheel  488 Feb 10  2017 phpunit.xml.dist
-rw-r--r--  1 root  wheel  18090 Feb 10  2017 smb_streams.c
-rw-r--r--  1 root  wheel  66137 Feb 10  2017 smbclient.c
drwxr-xr-x  2 root  wheel  18 Sep 10 17:29 tests

 
D

dlavigne

Guest
If it's not in pkg info it didn't get installed. Try make install again and see if it ends with an error.
 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
Ok, did the install again and got ....

Code:
root@nextcloud:~ # make config-recursive install -C /usr/ports/net/pecl-smbclient
===> Setting user-specified options for pecl-smbclient-0.9.0_2 and dependencies
===>  pecl-smbclient-0.9.0_2 depends on file: /usr/local/bin/phpize - found
===>  pecl-smbclient-0.9.0_2 depends on file: /usr/local/bin/autoconf-2.69 - not found
===>  autoconf-2.69_1 depends on executable: gm4 - not found
===>  m4-1.4.18,1 depends on executable: makeinfo - not found
===>  License GPLv3+ accepted by the user
===>  texinfo-6.3_1,1 depends on file: /usr/local/sbin/pkg - found
=> texinfo.tex doesn't seem to exist in /usr/ports/distfiles/texinfo/6.3.
=> Attempting to fetch http://ftpmirror.gnu.org/texinfo/texinfo.tex
fetch: http://ftpmirror.gnu.org/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: http://ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://www.gtlib.gatech.edu/pub/gnu/gnu/texinfo/texinfo.tex
fetch: http://www.gtlib.gatech.edu/pub/gnu/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://mirrors.kernel.org/gnu/texinfo/texinfo.tex
fetch: http://mirrors.kernel.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.kddlabs.co.jp/GNU/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.kddlabs.co.jp/GNU/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.dti.ad.jp/pub/GNU/texinfo/texinfo.tex
fetch: ftp://ftp.dti.ad.jp/pub/GNU/texinfo/texinfo.tex: Operation timed out
=> Attempting to fetch ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://ftp.funet.fi/pub/gnu/prep/texinfo/texinfo.tex
fetch: http://ftp.funet.fi/pub/gnu/prep/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://distcache.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.us-east.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.us-east.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.eu.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.eu.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.us-west.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.us-west.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/texinfo/6.3/texinfo.tex
fetch: http://distcache.FreeBSD.org/ports-distfiles/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/texinfo/6.3 and try again.
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/autoconf
*** Error code 1

Stop.
make: stopped in /usr/ports/net/pecl-smbclient

 
D

dlavigne

Guest
Double-check that you can ping an Internet address (eg google.com) from the jail. If you can't, make sure you have a DNS entry in /etc/resolv.conf and the correct default gateway is shown as UP in netstat -rn.

Also, you can save yourself a lot of time by installing the package instead, assuming it is available: pkg install pecl-smbclient..
 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
Double-check that you can ping an Internet address (eg google.com) from the jail. If you can't, make sure you have a DNS entry in /etc/resolv.conf and the correct default gateway is shown as UP in netstat -rn.

Also, you can save yourself a lot of time by installing the package instead, assuming it is available: pkg install pecl-smbclient..

Yes, able to ping, and correct gateway is UP (nextcloud works fine locally and through the internet, just trying to add external smb shares to it)

As far as the pkg goes, doing so removes php71 parts and replaces with php56 parts. I read somewhere (the thread I can no longer seem to find in a search) that the ports method should get around the php downgrade. (I could be completely misunderstanding this part though)
 
D

dlavigne

Guest
I don't think the package will as the Makefile only shows a dependency on PHP (not a specific version).

For the port, try doing make distclean to clean out the checksum mismatches and see if that moves the installation along.
 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
I don't think the package will as the Makefile only shows a dependency on PHP (not a specific version).

For the port, try doing make distclean to clean out the checksum mismatches and see if that moves the installation along.
Thanks :) I will give that a try
 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
pkg install pecl-smbclient:

Code:
root@nextcloud:~ # pkg install pecl-smbclient
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (1 conflicting)
  - php56-5.6.31 conflicts with php71-7.1.9 on /usr/local/bin/php
Checking integrity... done (0 conflicting)
The following 59 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
  php71-curl-7.1.9
  php71-7.1.9
  php71-dom-7.1.9
  php71-xmlreader-7.1.9
  php71-xsl-7.1.9
  php71-xml-7.1.9
  php71-wddx-7.1.9
  php71-session-7.1.9
  php71-memcache-3.0.8_1
  php71-zlib-7.1.9
  php71-gd-7.1.9
  php71-simplexml-7.1.9
  php71-xmlwriter-7.1.9
  php71-ctype-7.1.9
  php71-iconv-7.1.9
  php71-json-7.1.9
  php71-mbstring-7.1.9
  php71-posix-7.1.9
  php71-zip-7.1.9
  php71-pdo-7.1.9
  php71-pdo_mysql-7.1.9
  php71-hash-7.1.9
  php71-mysqli-7.1.9
  php71-filter-7.1.9
  php71-fileinfo-7.1.9
  php71-bz2-7.1.9
  php71-intl-7.1.9
  php71-mcrypt-7.1.9
  php71-openssl-7.1.9
  php71-ldap-7.1.9
  php71-ftp-7.1.9
  php71-imap-7.1.9
  php71-exif-7.1.9
  php71-gmp-7.1.9
  php71-opcache-7.1.9

New packages to be INSTALLED:
  pecl-smbclient: 0.9.0_2
  samba44: 4.4.15
  libsunacl: 1.0
  gnutls: 3.5.13
  trousers: 0.3.14_1
  tpm-emulator: 0.7.4_2
  p11-kit: 0.23.8
  libtasn1: 4.12
  nettle: 3.3
  python2: 2_3
  py27-dnspython: 1.15.0
  tevent: 0.9.31
  talloc: 2.1.9
  py27-iso8601: 0.1.11
  popt: 1.16_2
  libinotify: 20170711_1
  gamin: 0.1.10_9
  glib: 2.50.2_4,1
  tdb: 1.3.12,1
  ldb: 1.1.29_1
  libarchive: 3.3.1,1
  lzo2: 2.10_1
  liblz4: 1.8.0,1
  php56: 5.6.31

Number of packages to be removed: 35
Number of packages to be installed: 24

The process will require 152 MiB more space.

Proceed with this action? [y/N]: n

 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
distclean results (get to the same place eventually it seems)

Code:
root@nextcloud:~ #  make distclean install -C /usr/ports/net/pecl-smbclient
===>  Cleaning for autoconf-2.69_1
===>  Cleaning for m4-1.4.18,1
===>  Cleaning for pecl-smbclient-0.9.0_2
===>  Deleting distfiles for pecl-smbclient-0.9.0_2
===>  License BSD2CLAUSE accepted by the user
===>  pecl-smbclient-0.9.0_2 depends on file: /usr/local/sbin/pkg - found
=> smbclient-0.9.0.tgz doesn't seem to exist in /usr/ports/distfiles/PECL.
=> Attempting to fetch http://pecl.php.net/get/smbclient-0.9.0.tgz
smbclient-0.9.0.tgz  100% of  31 kB  34 kBps 00m01s
===> Fetching all distfiles required by pecl-smbclient-0.9.0_2 for building
===>  Extracting for pecl-smbclient-0.9.0_2
=> SHA256 Checksum OK for PECL/smbclient-0.9.0.tgz.
===>  Patching for pecl-smbclient-0.9.0_2
===>  pecl-smbclient-0.9.0_2 depends on file: /usr/local/bin/phpize - found
===>  pecl-smbclient-0.9.0_2 depends on file: /usr/local/bin/autoconf-2.69 - not found
===>  autoconf-2.69_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by autoconf-2.69_1 for building
===>  Extracting for autoconf-2.69_1
=> SHA256 Checksum OK for autoconf-2.69.tar.xz.
===>  Patching for autoconf-2.69_1
===>  Applying FreeBSD patches for autoconf-2.69_1
===>  autoconf-2.69_1 depends on executable: gm4 - not found
===>  License GPLv3 accepted by the user
===>  m4-1.4.18,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by m4-1.4.18,1 for building
===>  Extracting for m4-1.4.18,1
=> SHA256 Checksum OK for m4-1.4.18.tar.xz.
===>  Patching for m4-1.4.18,1
===>  Applying FreeBSD patches for m4-1.4.18,1
===>  m4-1.4.18,1 depends on executable: makeinfo - not found
===>  License GPLv3+ accepted by the user
===>  texinfo-6.3_1,1 depends on file: /usr/local/sbin/pkg - found
=> texinfo.tex doesn't seem to exist in /usr/ports/distfiles/texinfo/6.3.
=> Attempting to fetch http://ftpmirror.gnu.org/texinfo/texinfo.tex
fetch: http://ftpmirror.gnu.org/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: http://ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://www.gtlib.gatech.edu/pub/gnu/gnu/texinfo/texinfo.tex
fetch: http://www.gtlib.gatech.edu/pub/gnu/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://mirrors.kernel.org/gnu/texinfo/texinfo.tex
fetch: http://mirrors.kernel.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.kddlabs.co.jp/GNU/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.kddlabs.co.jp/GNU/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.dti.ad.jp/pub/GNU/texinfo/texinfo.tex
fetch: ftp://ftp.dti.ad.jp/pub/GNU/texinfo/texinfo.tex: Operation timed out
=> Attempting to fetch ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://ftp.funet.fi/pub/gnu/prep/texinfo/texinfo.tex
fetch: http://ftp.funet.fi/pub/gnu/prep/texinfo/texinfo.tex: size mismatch: expected 380556, actual 380753
=> Attempting to fetch http://distcache.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.us-east.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.us-east.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.eu.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.eu.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.us-west.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.us-west.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/texinfo/6.3/texinfo.tex
fetch: http://distcache.FreeBSD.org/ports-distfiles/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/texinfo/6.3 and try again.
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/autoconf
*** Error code 1

Stop.
make: stopped in /usr/ports/net/pecl-smbclient

 

trentk10

Explorer
Joined
Jan 7, 2017
Messages
69
Ok, I think I got there....

In reading through the errors, it seems I was missing things that made the install stop. The message about "=> port manually into /usr/ports/distfiles/texinfo/6.3 and try again."

So, I did a search on freshports and found texinfo. Tried a fresh ports install which failed due to other dependencies missing. So, I did pkg install texinfo and it would install without removing anything else, so i said 'y' and let it install and it did without error. !!!

I tried make distclean install -C /usr/ports/net/pecl-smbclient again, and it failed with errors again, this time the last one listed was 'autoconf'

Same process, tried ports autoconf (failed) so tried pkg install autoconf and it would install without removing anything so I say 'y' and it installed without error !!!

I tried make distclean install -C /usr/ports/net/pecl-smbclient again, and it failed with errors again, this time the last one listed was 'samba44'. Said that there were known vulnerabilities with this, and to try to install with make DISABLE_VULNERABILITIES=yes install -C /usr/ports/net/pecl-smbclient I tried this and it failed with errors.

So, next I tried pkg intsall samba44, said it would install without removing anything else, so i hit 'y' and it installed without error !!


I tried make distclean install -C /usr/ports/net/pecl-smbclient again, this time it completed without errors !!!!

did a restart of php-fpm, restart of apache24.....went to my nextcloud website in a browser, and smbclient not installed notification is gone, and I can add smb/cifs storage.

Thanks for the help :)
 
Status
Not open for further replies.
Top