我正在尝试安装 PHP 的 imagick 扩展,但 PHP 无法加载它。
我相信原因是 gcc 4.2 中的一个错误,如下所述这里。看起来您可以通过使用 --disable-openmp 标志编译 ImageMagick 来解决此错误,如此问题 58340 - imagick-php-extension-fails-to-load 中所述,但当我运行“make”时,它以以下输出结束:
CC utilities/animate.o
CCLD utilities/animate
magick/.libs/libMagickCore.so: undefined reference to `GOMP_parallel_loop_dynamic_start'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_loop_dynamic_next'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_parallel_end'
magick/.libs/libMagickCore.so: undefined reference to `omp_set_num_threads'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_critical_name_start'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_loop_end_nowait'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_critical_start'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_critical_name_end'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_critical_end'
magick/.libs/libMagickCore.so: undefined reference to `omp_get_max_threads'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_parallel_start'
magick/.libs/libMagickCore.so: undefined reference to `omp_get_thread_num'
magick/.libs/libMagickCore.so: undefined reference to `GOMP_loop_dynamic_start'
collect2: ld returned 1 exit status
make[1]: *** [utilities/animate] Error 1
make[1]: Leaving directory `/usr/src/ImageMagick-6.5.8-4'
make: *** [all] Error 2
我在跑:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04"
我正在尝试从源代码安装 ImageMagick 6.5.8-4。
有什么方法可以解决这个问题?
答案1
从开始以来,您运行过“make clean”吗?