linux系统把gif目录移到,(废弃) Linux(CentOS) 安装 gifski

正确在CentOS上安装Gifski的方法:

下列内容废弃,安装Gifski失败

安装gifski依赖pngquant

pngquant可以从你的操作系统上游存储库安装,也可以从源代码编译,从源代码构建pngquant的优点是,可以获得最新版本,而不是系统存储库中可用的软件包。

1、在CentOS安装pngquant

首先安装pngquant所需的依赖项:

一、安装 libpng-dev包

sudo yum -y install git libpng-devel gcc cmake

二、安装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

安装Gifski过程中会报错:libc.so.6(GLIBC_2.18)(64bit) is needed by gifski-0.10.1-2.x86_64

解决办法:原因是因为系统的glibc版本不符合安装要求,gifski要求版本glibc-2.18版本。

安装glibc遇到错误,原因 make版本过低

These critical programs are missing or too old: make compiler

安装make

cd /usr/local/src #进入软件包存放目录

tar -zxvf make-4.3.tar.gz #解压

cd make-4.3 #进入目录

./configure #

make && make install #编译#安装

ln -s -f /usr/local/bin/make /usr/bin/make #必须运行该语句否则还是旧版本

make -version # 查看make版本

安装binutils

cd /usr/local/src #进入软件包存放目录

tar -zxvf binutils-2.33.1.tar.gz #解压

cd binutils-2.33.1 #进入目录

./configure --prefix=/usr --enable-ld

make && make install #编译#安装

安装gcc报错:error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.

Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify

需要安装mpc、mpfr、gmp

参考:error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+

参考:Centos7环境下gcc由4.8升级到6.4

mpfr和mpc的安装方法与gmp类似。不过要注意配置的时候,一定要把gmp与mpfr的依赖关系选项加进去。

先安装gmp

cd /usr/local/src #进入软件包存放目录

tar -jxvf gmp-6.1.0.tar.bz2 #解压

cd gmp-6.1.0 #进入目录

./configure --prefix=/usr/local/gmp

make && make install #编译#安装

再安装mpfr

cd /usr/local/src #进入软件包存放目录

tar -jxvf mpfr-3.1.4.tar.bz2 #解压

cd mpfr-3.1.4 #进入目录

./configure --prefix=/usr/local/mpfr --with-gmp=/usr/local/gmp

make && make install #编译#安装

后安装mpc

cd /usr/local/src #进入软件包存放目录

tar -zxvf mpc-1.0.3.tar.gz #解压

cd mpc-1.0.3 #进入目录

./configure --prefix=/usr/local/mpc --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr

make && make install #编译#安装

在安装完gmp、mpfr和mpc后,

将库文件加入如下文件:

vi /etc/ld.so.conf

增加以下三行

/usr/local/gmp/lib

/usr/local/mpfr/lib

/usr/local/mpc/lib

加完后使用如下命令更新

ldconfig -v

gcc是由GNU开发的编程语言译器。GNU编译器套件包括C、C++、 Objective-C、 Fortran、Java、Ada和Go语言前端,也包括了这些语言的库(如libstdc++,libgcj等)

安装gcc(注意,安装gcc需要几个小时)

cd /usr/local/src #进入软件包存放目录

tar -zxvf gcc-10.1.0.tar.gz #解压

cd gcc-10.1.0

mkdir build #临时目录

cd build #进入目录

../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr --with-mpc=/usr/local/mpc #注意/configure前面是两个点

make -j4 && make install #编译#安装

gcc -v #查看gcc版本 #gcc version 10.1.0

再次尝试安装glibc但报错

参考:编译安装glibc

*** These auxiliary programs are missing or incompatible versions: makeinfo

*** some features will be disabled.

不过注意此处要安装texinfo,直接安装makeinfo是没有的。

安装texinfo

cd /usr/local/src #进入软件包存放目录

tar -zxvf texinfo-6.7.tar.gz #解压

cd texinfo-6.7 #进入目录

./configure #未指定安装目录

make && make install #编译#安装

makeinfo --version #查看版本 #texi2any (GNU texinfo) 6.7

再次尝试安装glibc但报错

参考:编译安装glibc

checking LD_LIBRARY_PATH variable... contains current directory

configure: error:

*** LD_LIBRARY_PATH shouldn't contain the current directory when

*** building glibc. Please change the environment variable

*** and run configure again.

提示:在 /etc/profile 文件中不要添加export LD_LIBRARY_PATH命令

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH :/...lib目录

如要添加LD_LIBRARY_PATH,请在 /etc/ld.so.conf 文件尾部追加类似代码

/usr/local/ffmpeg/lib

修改成功后,一定/必须要执行 sudo ldconfig 命令,而不是重启系统。

上述错误提示是LD_LIBRARY_PATH包含有当前文件夹。解决这个问题当前有两套方案,第一是把LD_LIBRARY_PATH临时设为空;第二种方案是先把LD_LIBRARY_PATH永久设为空,安装完毕后再改回来。

先试试第一种方案,命令如下:

export LD_LIBRARY_PATH=

glibc是GNU发布的libc库,即c运行库。glibc是linux系统中最底层的api,几乎其它任何运行库都会依赖于glibc。

参考:linux下编译安装glibc

glibc下载地址:http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz

安装glibc(需要十来分钟时间)

cd /usr/local/src #进入软件包存放目录

tar -zxvf glibc-2.18.tar.gz #解压

cd glibc-2.18 #进入目录

mkdir build #必须创建build文件夹

cd build #进入目录

../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin #注意/configure前面是两个点且必须指定安装目录

make && make install #编译#安装

ldd --version #查看glibc版本#ldd (GNU libc) 2.18

输入命令检查是否安装成功

ls -l /lib64/libc.so.6

输出:lrwxrwxrwx 1 root root 12 Jun 9 17:55 /lib64/libc.so.6 -> libc-2.31.so 则安装成功

特别注意:安装glibc后会出现错误提示,但这些错误可以忽略。

参考:CentOS 7.6 编译安装最新版本glibc2.30 实录

/usr/bin/ld: cannot find -lnss_test2 #此错误可以忽略

collect2: error: ld returned 1 exit status # 此编译错误可以无视

Execution of gcc -B/usr/bin/ failed! # 此编译错误可以无视

The script has found some problems with your installation!

Please read the FAQ and the README file and check the following:

Did you change the gcc specs file (necessary after upgrading from

Linux libc5)?

Are there any symbolic links of the form libXXX.so to old libraries?

Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,

libm.so should point to the newly installed glibc file - and there should be

only one such link (check e.g. /lib and /usr/lib)

You should restart this script from your build directory after you've

fixed all problems!

Btw. the script doesn't work if you're installing GNU libc not as your

primary library!

make[1]: *** [Makefile:120: install] Error 1

make[1]: Leaving directory '/usr/local/src/glibc-2.31' # 编译成功

make: *** [Makefile:12: install] Error 2 #此编译错误可以无视

一、安装alien,用于转包类型为.rpm

yum -y install alien

二、使用alien

cd /usr/local/src #进入软件包存放目录

alien -r gifski_0.10.1_amd64.deb

三、安装

rpm -ivh gifski-0.10.1-2.x86_64.rpm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值