之前用gifski_0.10.1_amd64.deb包安装失败了
下面是成功安装gifski的方法
先安装gifski依赖pngquant,而pngquant依赖libpng-dev
pngquant可以从你的操作系统上游存储库安装,也可以从源代码编译,从源代码构建pngquant的优点是,可以获得最新版本,而不是系统存储库中可用的软件包。
1、安装 libpng-dev包
sudo yum -y install git libpng-devel gcc cmake
2、安装pngquant包
cd /usr/local/src #进入软件包存放目录
git clone --recursive https://github.com/kornelski/pngquant.git #git克隆pngquant项目
cd pngquant
./configure #无需--prefix=指定安装目录
make && make install #编译#安装
pngquant --version #查看pngquant 版本#2.12.6 (July 2019)
./configure 不指定安装目录,make install 会将 pngquant装进/usr/local/bin,
所以,无需在/etc/profile文件中添加export PATH=$PATH:/usr/local/yasm/bin
3、安装gifski
国外网站:Enable snaps on CentOS and install Gifski
sudo yum -y install epel-release
sudo yum -y install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
注销并重新登录,或者重新启动系统,以确保正确更新snap的路径。
sudo snap install gifski #安装
gifski --help #查看版本和帮助信息#gifski 0.10.1
提示:好像 sudo snap install gifski 要执行两次,
执行第一次会提示:sudo snap install gifski
error: too early for operation, device not yet seeded or device model not acknowledged
执行第二次才是下载安装
国外网站的有关CentOS 安装Gifski
国外网站:https://snapcraft.io/install/gifski/centos
Enable snaps on CentOS and install Gifski
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Enable snapd
Snap is available for CentOS 7.6+, and Red Hat Enterprise Linux 7.6+, from the Extra Packages for Enterprise Linux (EPEL) repository. The EPEL repository can be added to your system with the following command:
sudo yum install epel-release
Snap can now be installed as follows:
sudo yum install snapd
Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:
sudo systemctl enable --now snapd.socket
To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap
and /snap
:
sudo ln -s /var/lib/snapd/snap /snap
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
Install Gifski
To install Gifski, simply use the following command:
sudo snap install gifski