Centos 7 安装 GraphicsMagick

Centos 7 安装 GraphicsMagick

我尝试在 Centos 7 上安装 GraphicsMagick 1.3.22。

为了安装 GraphicsMagick,我遵循了本教程:https://gist.github.com/paul91/9008409

以下是我所做的事情:

# Install build dependencies
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel

# Get GraphicsMagick source
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.22.tar.gz
tar zxvf GraphicsMagick-1.3.22.tar.gz

# Configure and compile
cd GraphicsMagick-1.3.22
./configure --enable-shared
make
make install

运行命令后make install我收到此消息并且 GraphicsMagick 没有运行。

Makefile:9955: warning: overriding recipe for target `PerlMagick/Magick.pm'
Makefile:4520: warning: ignoring old recipe for target `PerlMagick/Magick.pm'
make  install-am
make[1]: Entering directory `/home/sasha/GraphicsMagick-1.3.22'
Makefile:9955: warning: overriding recipe for target `PerlMagick/Magick.pm'
Makefile:4520: warning: ignoring old recipe for target `PerlMagick/Magick.pm'
make[2]: Entering directory `/home/sasha/GraphicsMagick-1.3.22'
Makefile:9955: warning: overriding recipe for target `PerlMagick/Magick.pm'
Makefile:4520: warning: ignoring old recipe for target `PerlMagick/Magick.pm'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   magick/libGraphicsMagick.la Magick++/lib/libGraphicsMagick++.la wand/libGraphicsMagickWand.la '/usr/local/lib'
libtool: install: /usr/bin/install -c magick/.libs/libGraphicsMagick.so.3.14.0 /usr/local/lib/libGraphicsMagick.so.3.14.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libGraphicsMagick.so.3.14.0': Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/sasha/GraphicsMagick-1.3.22'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/sasha/GraphicsMagick-1.3.22'
make: *** [install] Error 2

我想知道问题是什么。提前谢谢


更新:我没有使用 root 用户。

答案1

configure并且make不应以 root 用户身份运行,但是make install,因为它应该复制系统目录中的文件。否则您将收到类似您的错误

/usr/bin/install: cannot create regular file '/usr/local/lib/libGraphicsMagick.so.3.14.0': Permission denied

因此请以 root 身份运行 make install。

相关内容