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
相关推荐
宇晨T35 分钟前
BurpSuite实战:WackoPicko敏感目录探测
linux·运维·服务器
月巴月巴白勺合鸟月半1 小时前
在Linux下开发桌面程序
linux·运维·服务器
zh路西法1 小时前
【tmux入门】终端分屏、SSH远程守护与一键启动脚本
linux·运维·ssh·bash
qq_163135751 小时前
Linux 【03-pwd命令超详细教程】
linux
学途路漫漫1 小时前
Ubuntu 24.04 国内网络环境全面优化指南
linux·网络·ubuntu
c238561 小时前
GDB 进程概念详解(下篇)—— 多进程与进阶调试能力
linux·服务器·数据库
RisunJan1 小时前
Linux命令-php(PHP语言的命令行接口)
linux·php
A_humble_scholar1 小时前
Linux(八) 进程内存全景:环境变量、main 函数参数与虚拟地址空间全链路深度解析
linux·运维·服务器
longforus1 小时前
linux上播放音乐的终极解决方案
linux·音频·折腾
xcLeigh2 小时前
鸿蒙PC平台 Shotwell 照片管理器适配实战:从 Linux GNOME 到 鸿蒙PC 的 Electron 迁移
linux·electron·harmonyos·鸿蒙·shotwell·照片管理器