Linux下升级安装ImageMagick

服务器系统为 Centos

1.删除旧版本

/usr/bin/convert 是 ImageMagick 工具集中 convert 命令的可执行文件

复制代码
#确定已安装版本
convert  --version

# 对于基于RPM的系统,如Red Hat、CentOS
rpm -qf /usr/bin/convert  

#根据返回的版本信息,卸载(CentOS)
sudo rpm -e --nodeps ImageMagick-6.7.8.9-16.el7_6.x86_64
#或者
sudo yum remove ImageMagick-6.7.8.9-16.el7_6.x86_64

2.安装新版本

可以直接按照官网的教程安装,https://imagemagick.org/script/download.php

如果发现缺少很多依赖,可以直接从源码编译安装。

使用源码直接编译,下载地址https://imagemagick.org/script/install-source.php

复制代码
#解压缩
tar -xvf ImageMagick-x.x.x.tar.xz
cd ImageMagick-x.x.x
#配置、编译与安装
./configure --prefix=/usr/local/imagemagick # 可以指定自定义安装路径
make
sudo make install
#配置环境变量
echo 'export PATH="/usr/local/imagemagick/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
相关推荐
geek_super1 小时前
Linux命令学习--备份压缩--ar命令
linux·学习·ar
我是唐青枫10 小时前
Linux ar 命令使用详解
linux·运维·服务器
mljy.10 小时前
Linux《进程概念(上)》
linux
IEVEl11 小时前
Centos7 开放端口号
linux·网络·centos
我要升天!12 小时前
Linux中《环境变量》详细介绍
linux·运维·chrome
MobiCetus12 小时前
有关pip与conda的介绍
linux·windows·python·ubuntu·金融·conda·pip
weixin_4284984913 小时前
Linux系统perf命令使用介绍,如何用此命令进行程序热点诊断和性能优化
linux·运维·性能优化
lemon31062414 小时前
dockerfile制作镜像
linux·运维·服务器·学习
易保山15 小时前
MIT6.S081 - Lab5 Lazy(延迟分配)
linux·操作系统·c
想躺在地上晒成地瓜干16 小时前
树莓派超全系列文档--(14)无需交互使用raspi-config工具其一
linux·树莓派·raspberrypi·树莓派教程