Linux(CentOS) 安裝 gifski

之前用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
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容