Php warning php startup unable to load dynamic library imagick so

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alpine] imagick-3.5.0 can’t be load into PHP without $PHPIZE_DEPS #1173

[alpine] imagick-3.5.0 can’t be load into PHP without $PHPIZE_DEPS #1173

Comments

PHP Warning: PHP Startup: Unable to load dynamic library 'imagick' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so: No such file or directory)) in Unknown on line 0 

It says imagick.so: No such file or directory , but the file is there.
After rollback to my previous version, imagick-3.4.4 , everything is ok.

Читайте также:  Как определить класс python

The text was updated successfully, but these errors were encountered:

Yeah PECL extensions are all compiled so we should add a section about temporarily installing $PHPIZE_DEPS

Current status is I’m running into Imagick/imagick#443 (comment)

Error loading shared library libgomp.so.1

FROM php:alpine RUN apk add $PHPIZE_DEPS imagemagick-dev && \ mkdir -p /usr/src/php/ext/imagick && \ curl -fsSL https://pecl.php.net/get/imagick | tar xvz -C "/usr/src/php/ext/imagick" --strip 1 && \ docker-php-ext-install imagick && \ apk del $PHPIZE_DEPS
$ docker build . -t php:test Sending build context to Docker daemon 2.048kB Step 1/2 : FROM php:alpine ---> b224257ffa36 Step 2/2 : RUN apk add $PHPIZE_DEPS imagemagick-dev && mkdir -p /usr/src/php/ext/imagick && curl -fsSL https://pecl.php.net/get/imagick | tar xvz -C "/usr/src/php/ext/imagick" --strip 1 && docker-php-ext-install imagick && apk del $PHPIZE_DEPS ---> Using cache ---> 342eae452ce4 Successfully built 342eae452ce4 Successfully tagged php:test $ docker run --rm php:test php -i | grep imagick Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20200930/imagick.so (Error loading shared library libgomp.so.1: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20200930/imagick.so)), /usr/local/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20200930/imagick.so.so: No such file or directory)) in Unknown on line 0 Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini
$ cat Dockerfile FROM php:alpine RUN apk add $PHPIZE_DEPS imagemagick-dev && \ mkdir -p /usr/src/php/ext/imagick && \ curl -fsSL https://pecl.php.net/get/imagick | tar xvz -C "/usr/src/php/ext/imagick" --strip 1 && \ pecl install imagick && \ docker-php-ext-enable imagick && \ apk del $PHPIZE_DEPS RUN apk add libgomp
$ docker build . -t php:test . . . (1/1) Purging .docker-php-ext-enable-deps (20210628.172520) OK: 258 MiB in 74 packages World updated, but the following packages are not removed due to: pkgconf: imagemagick-dev (1/21) Purging autoconf (2.71-r0) (2/21) Purging m4 (1.4.18-r2) (3/21) Purging dpkg (1.20.9-r0) (4/21) Purging dpkg-dev (1.20.9-r0) (5/21) Purging perl (5.32.1-r0) (6/21) Purging file (5.40-r1) (7/21) Purging g++ (10.3.1_git20210424-r2) (8/21) Purging gcc (10.3.1_git20210424-r2) (9/21) Purging binutils (2.35.2-r2) (10/21) Purging libatomic (10.3.1_git20210424-r2) (11/21) Purging libgomp (10.3.1_git20210424-r2) (12/21) Purging libgphobos (10.3.1_git20210424-r2) (13/21) Purging libc-dev (0.7.2-r3) (14/21) Purging musl-dev (1.2.2-r3) (15/21) Purging make (4.3-r0) (16/21) Purging re2c (2.1.1-r0) (17/21) Purging libmagic (5.40-r1) (18/21) Purging mpc1 (1.2.1-r0) (19/21) Purging mpfr4 (4.1.0-r0) (20/21) Purging isl22 (0.22-r0) (21/21) Purging gmp (6.2.1-r0) Executing busybox-1.33.1-r2.trigger OK: 27 MiB in 53 packages Removing intermediate container 39268f246749 ---> ffb50816a112 Step 3/3 : RUN apk add libgomp ---> Running in fa9c301bdddc (1/1) Installing libgomp (10.3.1_git20210424-r2) OK: 27 MiB in 54 packages Removing intermediate container fa9c301bdddc ---> 3964e546eb50 Successfully built 3964e546eb50 Successfully tagged php:test $ docker run --rm php:test php -i | grep imagick Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini, imagick imagick module => enabled imagick module version => 3.5.0 imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel imagick.allow_zero_dimension_images => 0 => 0 imagick.locale_fix => 0 => 0 imagick.progress_monitor => 0 => 0 imagick.set_single_thread => 1 => 1 imagick.shutdown_sleep_count => 10 => 10 imagick.skip_version_check => 0 => 0

See also how WordPress handles this:

(which is a tad verbose but results in the smallest possible installation and without explicitly listing runtime dependencies — only build-time)

Источник

Unable to load dynamic library ‘imagick.so’ – How to resolve

Here at Bobcares, we often receive requests regarding Imagick as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix this IMagick error.

Unable to load dynamic library imagick.so

Typical error will look as below in your apache error_logs.

[18-Aug-2011 09:07:32] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so’ – /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0

Which means one of your websites is trying to use ImageMagick, but your server doesn’t have it.

This is resulting in PHP errors, which will then report in the error log.

You can resolve it by either stoping your website from trying to use ImageMagick, or by installing ImageMagick.

We have put together a basic process below that will install ImageMagick on a cPanel server that is running CentOS.

cPanel does have a quick install method, but it doesn’t work on all systems.

How to resolve it?

Today, let us discuss about the two methods followed by our Support Techs to resolve this error.

Method 1:

This method is simple and quick.

You simply need to connect via SSH to the server with root privileges and run the following command at the prompt:

/scripts/installimagemagick

That will install it for you,but as mentioned earlier it won’t work in cPanel servers.

In that case you can follow method 2.

Method 2:

In this method, you would need to install ImageMagick.

Firstly, you need to download the source files. We recommend downloading the latest version, but they have several versions that you can download if you want a specific version.

The repository for the source files can be found here: click here.

Run the following commands once you have found the right file:

wget http://www.magickwand.org/download/php/MagickWandForPHP-1.0.8.tar.gz tar -zxvf MagickWandForPHP-1.0.8.tar.gz cd MagickWandForPHP-1.0.8 phpize ./configure make make install

You should now have ImageMagick installed and running on your server.

Then you can install the supporting libraries.

[Need any further assistance with ImageMagick? – We’ll help you]

Conclusion

Today, we saw how our Support Techs resolve Imagick error when you are unable to load dynamic library ‘imagick.so’

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Startup: Unable to load dynamic library ‘imagick’ on imagick 3.5.0 #443

PHP Startup: Unable to load dynamic library ‘imagick’ on imagick 3.5.0 #443

Comments

our tests are failing because of the new imagick version. If i change pecl install imagick to pecl install imagick-3.4.4 everything works as expected.

/app $ php -v [28-Jun-2021 08:53:54 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'imagick' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so (Error loading shared library libgomp.so.1: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so))) in Unknown on line 0 PHP 7.4.20 (cli) (built: Jun 3 2021 22:44:53) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies 

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью