之前用gifski_0.10.1_amd64.deb包安裝失敗了
下面是成功安裝gifski的方法
先安裝gifski依賴pngquant,而pngquant依賴libpng-dev
pngquant可以從你的操作系統(tǒng)上游存儲(chǔ)庫安裝,也可以從源代碼編譯,從源代碼構(gòu)建pngquant的優(yōu)點(diǎn)是,可以獲得最新版本,而不是系統(tǒng)存儲(chǔ)庫中可用的軟件包。
1、安裝 libpng-dev包
sudo yum -y install git libpng-devel gcc cmake
2、安裝pngquant包
cd /usr/local/src #進(jìn)入軟件包存放目錄
git clone --recursive https://github.com/kornelski/pngquant.git #git克隆pngquant項(xiàng)目
cd pngquant
./configure #無需--prefix=指定安裝目錄
make && make install #編譯#安裝
pngquant --version #查看pngquant 版本#2.12.6 (July 2019)
./configure 不指定安裝目錄,make install 會(huì)將 pngquant裝進(jìn)/usr/local/bin,
所以,無需在/etc/profile文件中添加export PATH=$PATH:/usr/local/yasm/bin
3、安裝gifski
國外網(wǎng)站: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
注銷并重新登錄,或者重新啟動(dòng)系統(tǒng),以確保正確更新snap的路徑。
sudo snap install gifski #安裝
gifski --help #查看版本和幫助信息#gifski 0.10.1
提示:好像 sudo snap install gifski 要執(zhí)行兩次,
執(zhí)行第一次會(huì)提示:sudo snap install gifski
error: too early for operation, device not yet seeded or device model not acknowledged
執(zhí)行第二次才是下載安裝
國外網(wǎng)站的有關(guān)CentOS 安裝Gifski
國外網(wǎng)站: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