# php74 modules curl, gd etc... can't load shared lib.



## valenpo (Sep 22, 2020)

Hello, I have installed 12.1-RELEASE-p2 FreeBSD 12.1-RELEASE-p2 GENERIC  amd64.

And installed php74 via pkg and different modules:

```
php74-7.4.10                   PHP Scripting Language
php74-ctype-7.4.10             The ctype shared extension for php
php74-curl-7.4.10              The curl shared extension for php
php74-dom-7.4.10               The dom shared extension for php
php74-exif-7.4.10              The exif shared extension for php
php74-extensions-1.0           "meta-port" to install PHP extensions
php74-fileinfo-7.4.10          The fileinfo shared extension for php
php74-filter-7.4.10            The filter shared extension for php
php74-gd-7.4.10                The gd shared extension for php
php74-iconv-7.4.10             The iconv shared extension for php
php74-json-7.4.10              The json shared extension for php
php74-mbstring-7.4.10          The mbstring shared extension for php
php74-mysqli-7.4.10            The mysqli shared extension for php
php74-opcache-7.4.10           The opcache shared extension for php
php74-openssl-7.4.10           The openssl shared extension for php
php74-pdo-7.4.10               The pdo shared extension for php
php74-pdo_sqlite-7.4.10        The pdo_sqlite shared extension for php
php74-pecl-imagick-3.4.4       PHP wrapper to the ImageMagick/GraphicsMagick library version 6
php74-phar-7.4.10              The phar shared extension for php
php74-posix-7.4.10             The posix shared extension for php
php74-session-7.4.10           The session shared extension for php
php74-simplexml-7.4.10         The simplexml shared extension for php
php74-sqlite3-7.4.10           The sqlite3 shared extension for php
php74-tokenizer-7.4.10         The tokenizer shared extension for php
php74-xml-7.4.10               The xml shared extension for php
php74-xmlreader-7.4.10         The xmlreader shared extension for php
php74-xmlwriter-7.4.10         The xmlwriter shared extension for php
php74-zip-7.4.10               The zip shared extension for php
php74-zlib-7.4.10              The zlib shared extension for php
```

after try restart php-fpm
`service php-fpm restart`

and get issue that shared libs are not present:

```
Performing sanity check on php-fpm configuration:
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20190902/curl.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;), /usr/local/lib/php/20190902/curl.so.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20190902/curl.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;), /usr/local/lib/php/20190902/curl.so.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20190902/gd.so (Shared object &quot;libpng16.so.16&quot; not found, required by &quot;libgd.so.6&quot;), /usr/local/lib/php/20190902/gd.so.so (Cannot open &quot;/usr/local/lib/php/20190902/gd.so.so&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20190902/gd.so (Shared object &quot;libpng16.so.16&quot; not found, required by &quot;libgd.so.6&quot;), /usr/local/lib/php/20190902/gd.so.so (Cannot open &quot;/usr/local/lib/php/20190902/gd.so.so&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20190902/imagick.so (Shared object &quot;libharfbuzz.so.0&quot; not found, required by &quot;libraqm.so.0&quot;), /usr/local/lib/php/20190902/imagick.so.so (Cannot open &quot;/usr/local/lib/php/20190902/imagick.so.so&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20190902/imagick.so (Shared object &quot;libharfbuzz.so.0&quot; not found, required by &quot;libraqm.so.0&quot;), /usr/local/lib/php/20190902/imagick.so.so (Cannot open &quot;/usr/local/lib/php/20190902/imagick.so.so&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Stopping php_fpm.
Performing sanity check on php-fpm configuration:
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20190902/curl.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;), /usr/local/lib/php/20190902/curl.so.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20190902/curl.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;), /usr/local/lib/php/20190902/curl.so.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20190902/gd.so (Shared object &quot;libpng16.so.16&quot; not found, required by &quot;libgd.so.6&quot;), /usr/local/lib/php/20190902/gd.so.so (Cannot open &quot;/usr/local/lib/php/20190902/gd.so.so&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20190902/gd.so (Shared object &quot;libpng16.so.16&quot; not found, required by &quot;libgd.so.6&quot;), /usr/local/lib/php/20190902/gd.so.so (Cannot open &quot;/usr/local/lib/php/20190902/gd.so.so&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20190902/imagick.so (Shared object &quot;libharfbuzz.so.0&quot; not found, required by &quot;libraqm.so.0&quot;), /usr/local/lib/php/20190902/imagick.so.so (Cannot open &quot;/usr/local/lib/php/20190902/imagick.so.so&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20190902/imagick.so (Shared object &quot;libharfbuzz.so.0&quot; not found, required by &quot;libraqm.so.0&quot;), /usr/local/lib/php/20190902/imagick.so.so (Cannot open &quot;/usr/local/lib/php/20190902/imagick.so.so&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20190902/curl.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;), /usr/local/lib/php/20190902/curl.so.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20190902/curl.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;), /usr/local/lib/php/20190902/curl.so.so (Shared object &quot;libnghttp2.so.14&quot; not found, required by &quot;libcurl.so.4&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20190902/gd.so (Shared object &quot;libpng16.so.16&quot; not found, required by &quot;libgd.so.6&quot;), /usr/local/lib/php/20190902/gd.so.so (Cannot open &quot;/usr/local/lib/php/20190902/gd.so.so&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20190902/gd.so (Shared object &quot;libpng16.so.16&quot; not found, required by &quot;libgd.so.6&quot;), /usr/local/lib/php/20190902/gd.so.so (Cannot open &quot;/usr/local/lib/php/20190902/gd.so.so&quot;)) in <b>Unknown</b> on line <b>0</b><br />
[22-Sep-2020 08:36:10] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20190902/imagick.so (Shared object &quot;libharfbuzz.so.0&quot; not found, required by &quot;libraqm.so.0&quot;), /usr/local/lib/php/20190902/imagick.so.so (Cannot open &quot;/usr/local/lib/php/20190902/imagick.so.so&quot;)) in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20190902/imagick.so (Shared object &quot;libharfbuzz.so.0&quot; not found, required by &quot;libraqm.so.0&quot;), /usr/local/lib/php/20190902/imagick.so.so (Cannot open &quot;/usr/local/lib/php/20190902/imagick.so.so&quot;)) in <b>Unknown</b> on line <b>0</b><br />
```


All libs are present.

Any clue? Can't find any information about it googling.

Thanks.


----------



## valenpo (Sep 22, 2020)

Check lib exist, but for some reason can't be found. 


```
root@bsd-fra1-archiva:~ # ldd /usr/local/lib/php/20190902/curl.so
/usr/local/lib/php/20190902/curl.so:
    libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x800687000)
    libc.so.7 => /lib/libc.so.7 (0x80024a000)
    libnghttp2.so.14 => not found (0)
    libssl.so.111 => /usr/lib/libssl.so.111 (0x800711000)
    libheimntlm.so.11 => /usr/lib/libheimntlm.so.11 (0x8007a9000)
    libhx509.so.11 => /usr/lib/libhx509.so.11 (0x800e00000)
    libcom_err.so.5 => /usr/lib/libcom_err.so.5 (0x8007b2000)
    libcrypto.so.111 => /lib/libcrypto.so.111 (0x800e52000)
    libasn1.so.11 => /usr/lib/libasn1.so.11 (0x801141000)
    libwind.so.11 => /usr/lib/libwind.so.11 (0x8007b7000)
    libheimbase.so.11 => /usr/lib/libheimbase.so.11 (0x8007e1000)
    libroken.so.11 => /usr/lib/libroken.so.11 (0x8007e8000)
    libcrypt.so.5 => /lib/libcrypt.so.5 (0x8011e7000)
    libz.so.6 => /lib/libz.so.6 (0x801208000)
    libkrb5.so.11 => /usr/lib/libkrb5.so.11 (0x801222000)
    libgssapi.so.10 => /usr/lib/libgssapi.so.10 (0x8012a5000)
    libgssapi_krb5.so.10 => /usr/lib/libgssapi_krb5.so.10 (0x8012b2000)
    libthr.so.3 => /lib/libthr.so.3 (0x8012d4000)
    libprivateheimipcc.so.11 => /usr/lib/libprivateheimipcc.so.11 (0x801301000)
root@bsd-fra1-archiva:~ # ls -la /usr/local/lib/libnghttp2.so.14
lrwxr-xr-x  1 root  wheel  21 Sep  3 01:22 /usr/local/lib/libnghttp2.so.14 -> libnghttp2.so.14.20.0
```


----------

