• Support
  • Error when I install ImageMagick extension

Hi! When I install the extensions ImageMagick from the panel on any 8.x php version, the service failed to start. After that, when I manually, I receive that error : Segmentation fault (core dumped).

It happen on 8.0, 8.1 and 8.2. Anyone got this error ?

Thanks

Simon

    It don't solve the error 🙁

    I try to uninstall and reinstall php / extension and that don't solve the problem

      Hi ! Everything seem to be good, there is the log 🇦

      creating libtool
      appending configuration tag "CXX" to libtool
      configure: patching config.h.in
      configure: creating ./config.status
      config.status: creating config.h
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      mkdir .libs
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=compile cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/w>
      cc -I. -I/www/server/panel/install/imagick-3.7.0 -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSR>
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=link cc -shared -I/www/server/panel/install/imagick-3.7.0/include -I/www/server/panel/install/imagick-3.7.0/main -I/www/server/panel/install/imagick-3.7.0 -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/>
      cc -shared .libs/imagick_file.o .libs/imagick_class.o .libs/imagickdraw_class.o .libs/imagickpixel_class.o .libs/imagickpixeliterator_class.o .libs/imagick_helpers.o .libs/imagick.o .libs/imagickkernel_class.o .libs/shim_im6_to_im7.o -lgomp -L/usr/local/lib /usr/local/lib/libMagickWand-7.Q16HD>
      creating imagick.la
      (cd .libs && rm -f imagick.la && ln -s ../imagick.la imagick.la)
      /bin/sh /www/server/panel/install/imagick-3.7.0/libtool --mode=install cp ./imagick.la /www/server/panel/install/imagick-3.7.0/modules
      cp ./.libs/imagick.so /www/server/panel/install/imagick-3.7.0/modules/imagick.so
      cp ./.libs/imagick.lai /www/server/panel/install/imagick-3.7.0/modules/imagick.la

      PATH="$PATH:/sbin" ldconfig -n /www/server/panel/install/imagick-3.7.0/modules

      Libraries have been installed in:
      /www/server/panel/install/imagick-3.7.0/modules

      If you ever happen to want to link against installed libraries
      in a given directory, LIBDIR, you must either use libtool, and
      specify the full pathname of the library, or use the `-LLIBDIR'
      flag during linking and do at least one of the following:

      • add LIBDIR to the `LD_LIBRARY_PATH' environment variable
        during execution
      • add LIBDIR to the `LD_RUN_PATH' environment variable
        during linking
      • use the `-Wl,--rpath -Wl,LIBDIR' linker flag
      • have your system administrator add LIBDIR to `/etc/ld.so.conf'

      See any operating system documentation about shared libraries for

      more information, such as the ld(1) and ld.so(8) manual pages.

      Build complete.
      Don't forget to run 'make test'.

      Installing shared extensions: /www/server/php/82/lib/php/extensions/no-debug-non-zts-20220829/
      Installing header files: /www/server/php/82/include/php/
      Reload service php-fpm done
      |-Successify --- Command executed! ---

        aaPanel_Kern

        Hi! Yes, after that, the php-fpm don't start, I receive the same error : Segmentation fault (core dumped)

        If I comment the config line about ImageMagick :

        [ImageMagick]
        extension = "imagick.so"

        The service restart perfectly.. I can't use that extension 🙁

          9 days later

          HI! Sorry for the delay ! I use Ubuntu 23.10 from Digital Ocean (CPU Regular Intel)

          5 days later

          simonsheehy
          Hi, can you give us your aapanel information? The server makes a snapshot backup first, if possible, please send it to kern@aapanel.com.
          It is recommended to fill in the following
          Post link:
          SSH IP address, account password and port:
          aapanel login link address and account password:

          No post link will not be able to know which user's information is, and the problem will not be processed

          I have the same problem, is there anyway to resolve ?

          I have this problem everytime and always fix it with this command

          apt-get install lsphp82-imagick

          (with the version you need... 80, 81, 82, etc)

          I hope this helps.

            6 months later

            carlita

            Hi, I have the same problem and it stopped the entire production server

            When I use your solution it gives me:
            apt-get install lsphp83-imagick
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            E: Unable to locate package lsphp83-imagick

            aaPanel_Kern

            Hi Kern, I have the same error :

            ``failed to activate:

            /etc/init.d/php-fpm-83: line 47: 17224 Segmentation fault $php_fpm_BIN --daemonize $php_opts

            ``

            Any idea how to fix it? The worst, it happened from this morning and it is a production server.
            I run the server on private network, so no accessible from outside, because I would give the credentials to take a look..

            Can you help me out?

            Hello, what is your operating system and version? What is the architecture of the CPU?
            Do you use openlitespeed? lsphp83 is the php version of openlitespeed
            What operations have you done? Have you tried reinstalling php?

              aaPanel_Kern

              Hi Kern, thank you so much for your quick assistance.
              So everything was working fine until this morning.
              We use:
              Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz * 2
              2 CPU, 24 Physical core, 48 Logical core

              All i remember doing was Update from the top right menu when there's a red point that an update is there.
              Now suddenly we see that I cannot satart the php.

              Here's what is happenning;

              I installed both fast and php 8.3.7 compiled version.
              Initially, it works. But then :

              • I install from the extension list > Imagick extension and that breaks everything so php cannot be started.
                however, when I uninstall from the extension list, I get the error:

                Hello, please check the php configuration file and check if there is any imagick related configuration. Try commenting and restarting PHP. Is it possible to solve the problem?

                aaP_cameradulce

                  aaPanel_Kern

                  On php8.3 config file I only found this at the very bottom:
                  [ImageMagick]
                  extension = "imagick.so"

                  So I commented out and php works.

                  However, now, I tried on php8.2 where I had the same problem, this time I didn't install from Install Extensions but I tried to only paste this and php works without problem:
                  [ImageMagick]
                  extension = "imagick.so"

                  and now when I go to Install extensions -> it shows as installed, however I didn't install from here

                  My question is, is imagemagick working this way or it is just formally there but not really installed as I didn't install from Install Extensions tab?

                  Thank you in advance!

                    Connect with us: 📨 Telegram 💬 Discord Email: support@aapanel.com