PHP module missing, how to install(bcmath gmp)

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What are you trying to achieve? You cannot install additional software on FreeNAS. Period. Simply don't.
You can install whatever you like in a jail or in a VM, though. With the complete user story we might be able to suggest a reasonable approach.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
What are you trying to achieve? You cannot install additional software on FreeNAS. Period. Simply don't.
You can install whatever you like in a jail or in a VM, though. With the complete user story we might be able to suggest a reasonable approach.

I think he is referring to this when you check the NC 19 setup and security section after installation.

1592901587081.png


On NC 18, it was only imagick but i ignored that.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Well he did not mention Nextcloud, so your crystal ball seems to be better than mine ;) In a jail it is of course as simple as pkg add ...
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Well, to defend the OP. It was posted in the nextcloud section of the plugins forum .... ;)
But of course the post is written in a way it's really hard to get what he wants.
Minimum effort to get an answer looks different.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Oh sh...! I only ever enter the forum through the "What's new" page. My bad.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Well he did not mention Nextcloud, so your crystal ball seems to be better than mine ;) In a jail it is of course as simple as pkg add ...
Does that also work if you installed the NC plugin?
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
In my nextcloud plugin-jail:
Code:
root@nextcloud:~ # pkg search gmp
gmp-6.1.2_1                    Free library for arbitrary precision arithmetic
gmp-api-58                     Gecko Media Plugins API from mozilla-release

But remeber: anything added with pkg will be gone after the plugin itself is updated.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
In my nextcloud plugin-jail:
Code:
root@nextcloud:~ # pkg search gmp
gmp-6.1.2_1                    Free library for arbitrary precision arithmetic
gmp-api-58                     Gecko Media Plugins API from mozilla-release

But remeber: anything added with pkg will be gone after the plugin itself is updated.

What does gmp do? I noticed after the plugin update the i cannot view my pictures anymore with the new photo app. Is this related? And then my 2nd question would be, why isn't gmp included in the plugin install?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
It's an arithmetic library used by Nextcloud for $stuff the Nextcloud developers know. You can simply iocage console into your plugin jail and then use pkg add to install missing pieces.
As for the reason: the plugin maintainer probably forgot to include the package.
 
Last edited:

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
It's an arithmetic library used by Nextcloud for $stuff the Nextcloud developers know. You can simply iocage console into your plugin jail and then use pkg add to install missing pieces.
As for the reason: the plugin maintainer probably forgot to include the package.

Where can i find the exact command? It appears that 6.2.0 is the latest version but i can't seem to allocate the correct pkg add command.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
If i do a pkg search amp, this is what i get:

Code:
Edit /etc/motd to change this login announcement.
root@nextcloud:~ # pkg search gmp
R-cran-gmp-0.6.0               Multiple Precision Arithmetic
fpc-gmp-3.0.4_4                Free Pascal interface to gmp library
gmp-6.2.0                      Free library for arbitrary precision arithmetic
gmp-api-58                     Gecko Media Plugins API from mozilla-release
gmp-ecm-7.0.4                  Elliptic Curve Method for Integer Factorization
gmpc-11.8.16_5,1               Full featured GTK2 client for musicpd
gmpc-alarm-11.8.16_4           Alarm plugin for gmpc
gmpc-albumview-11.8.16_4       Draws all album covers
gmpc-discogs-0.20.0_6          Album Image fetcher for gmpc
gmpc-extraplaylist-0.20.0_6    Favorites plugin for gmpc
gmpc-lastfm-0.20.0_6           Last.FM metadata fetcher plugin for gmpc
gmpc-libnotify-11.8.16_4       Libnotify for gmpc
gmpc-lyrics-11.8.16_5          Lyrics Provider plugin for gmpc
gmpc-lyricsplugin-0.20.0_6     Fetch lyrics gmpc plugin
gmpc-magnatune-11.8.16_6       Magnatune plugin lets you preview music from Magnatune
gmpc-mdcover-0.20.0_6          Collects metadata for gmpc
gmpc-mserver-0.20.0_14         Lets you stream music files to your mpd that arenot in your database
gmpc-shout-0.20.0_6            Shoutcast stream for gmpc
igmpproxy-0.2.1_1,1            Multicast forwarding IGMP proxy
mingw32-libgmp-6.0.0_3         Library for arbitrary precision arithmetic (MinGW32)
p5-Crypt-DH-GMP-0.00012_1      Crypt::DH Using GMP Directly
p5-Encode-Base32-GMP-0.02      High speed Base32 encoding using GMP with BigIntand MD5 support
p5-Encode-Base58-GMP-1.00      High speed Base58 encoding using GMP with BigIntand MD5 support
p5-Math-BigInt-GMP-1.6007      Use GMP library for Math::BigInt routines
p5-Math-GMP-2.20               Perl module that provides an interface to the GMP library
p5-Math-GMPf-0.43              Perl interface to the GMP library floating point(mpf) functions
p5-Math-GMPq-0.45              Perl interface to the GMP library rational (mpq)functions
p5-Math-GMPz-0.48              Perl interface to the GMP library integer (mpz) functions
p5-Math-Prime-Util-GMP-0.51    Utilities related to prime numbers and factoring, using GMP
php72-gmp-7.2.31               The gmp shared extension for php
php73-gmp-7.3.19               The gmp shared extension for php
php74-gmp-7.4.7                The gmp shared extension for php
py27-gmpy-1.17_1               Python Extension that Wraps the GMP Library
py27-gmpy2-2.0.8_3             GMP/MPIR, MPFR, and MPC interface to Python
py37-gmpy-1.17_19               The gmp shared extension for php
py27-gmpy-1.17_1               Python Extension that Wraps the GMP Library
py27-gmpy2-2.0.8_3             GMP/MPIR, MPFR, and MPC interface to Python
py37-gmpy-1.17_1               Python Extension that Wraps the GMP Library


So in essence, gmp appears to be installed but NC just doesn't detect it. Might be some config issue.
 
Last edited:

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
These modules are not installed. They are available in the package repository and can be installed by the package manager.

You should make yourself familiar with the pkg command and FreeBSD package managment.
When copying commands from a forum, which you don't understand, there will be a good chance things go wrong.

This might be a worth a read:
 

angel2009123

Dabbler
Joined
Jun 21, 2020
Messages
17
Thank you very much for your comments
I saw the security and setting alarm during the installation of nextcloud
Some recommended PHP modules are missing from this instance. To improve performance and compatibility, we strongly recommend installing them.

bcmath

GMP
-----------------------------------------------
Can these alarms be ignored
 

angel2009123

Dabbler
Joined
Jun 21, 2020
Messages
17
What are you trying to achieve? You cannot install additional software on FreeNAS. Period. Simply don't.
You can install whatever you like in a jail or in a VM, though. With the complete user story we might be able to suggest a reasonable approach.
I installed nextcloud in the jails environment,Can these alarms be ignored
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You should not ignore them, just install the modules with pkg install. Sorry for writing pkg add at first, my mistake.

You can use pkg info, to check which PHP version the plugin uses, because you have to install the matching PHP modules. Like e.g. for PHP 7.4:
Code:
pkg install php74-bcmath
pkg install php74-gmp


You need to do this inside your plugin, not on the FreeNAS base system. You can use iocage console <plugin-name> to get "inside".

Then restart your plugin. You will probably have to repeat that after every update unless the plugin maintainer adds these modules. Please create a bug ticket for that.
 

angel2009123

Dabbler
Joined
Jun 21, 2020
Messages
17
You should not ignore them, just install the modules with pkg install. Sorry for writing pkg add at first, my mistake.

You can use pkg info, to check which PHP version the plugin uses, because you have to install the matching PHP modules. Like e.g. for PHP 7.4:
Code:
pkg install php74-bcmath
pkg install php74-gmp


You need to do this inside your plugin, not on the FreeNAS base system. You can use iocage console <plugin-name> to get "inside".

Then restart your plugin. You will probably have to repeat that after every update unless the plugin maintainer adds these modules. Please create a bug ticket for that.
thank you very much
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
These modules are not installed. They are available in the package repository and can be installed by the package manager.

You should make yourself familiar with the pkg command and FreeBSD package managment.
When copying commands from a forum, which you don't understand, there will be a good chance things go wrong.

This might be a worth a read:

I wish i had more practical knowledge on freebsd and the commands but i don't, one of the reasons i install stuff using the plugins, of which my expectation would be that they just work. If this is not the case, what's the point in the first place?
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Eventually, i executed the commands and the errors are gone. Bottom line though is that i regret moving from 18.05 to 19. 18.05 was running flawless and it was only because the plugin version in FreeNAS was at 19 that i wrongly assumed that it would be alright to install 19 if the plugin was updated. I was wrong. Whilst NC still works as before, the gallery slideshow is gone and replaced by photos which has no functionality whatsoever. It doesn't provide any sorting options, slideshow functionality nor can i play videos in the environment. I can still play them in files, but this was way better in 18.
 
Top