您的位置:首页 > 其它

ubuntu14.04 下安装 glib-2.44.1 的过程记录

2015-07-18 09:53 447 查看
安装glib-2.44.1
先说清楚,这是一篇纠结文,正确答案请看这里

纠结开始了:

下载https://github.com/GNOME/glib

参考https://developer.gnome.org/glib/2.44/

要用到autoconf生成配置脚本

先使用apt-get install autoconf安装autoconf,这个稍微有点慢。

然后在glib-master目录下运行

autoconf configure.ac

报错了

configure.ac:66: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.



这个问题还没解决,又遇到一个新的问题,就是我把glib-master在虚拟机的共享文件夹中解压然后拷贝到ubuntu的根目录下之后,

glib-master下会自动出现一个configure文件,我按照安装文档说的运行./configure又提示bash: ./configure: No such file or directory

然后我用ls -l 列出目录和文件的详细信息,却发现列表中根本没有configure这个文件



真实诡异啊!!!!

即便是我要删除这个文件,也会提示no such file or directory,但是这个文件依然赤裸裸的在我的文件列表中。

先不管这个,网上有人说试试安装libtool

apt-get install libtool

网速是硬伤....

终于装好了,然后autoconf,这回没有报错。

然后ls -l能看到configure这个文件了



继续 ./configure

又报错

./configure: line 2607: syntax error near unexpected token `1.11'
./configure: line 2607: `AM_INIT_AUTOMAKE(1.11 -Wno-portability no-define no-dist-gzip dist-xz tar-ustar)'

试试 autoreconf -i

又报错

Makefile.am: error: required file './README' not found
parallel-tests: installing './test-driver'
automake: error: cannot open < gtk-doc.make: No such file or directory
autoreconf: automake failed with exit status: 1

忽略这个错误,再试试

autoreconf -fi

依然报错

Makefile.am: error: required file './README' not found
automake: error: cannot open < gtk-doc.make: No such file or directory
autoreconf: automake failed with exit status: 1

继续装作没看见,运行

./configure

报错如下:

checking for LIBFFI... no
configure: error: Package requirements (libffi >= 3.0.0) were not met:

No package 'libffi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

装个libffi先

wget ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
tar zxvf libffi-3.0.11.tar.gz

cd libffi-3.0.11/

./configure

make

make install

然后再重新回到glib-master目录运行

./configure

对了,我自己建了一个空的文件README,不知道有啥影响,先放着。

这次输出好长,给我造成了一种大功告成的错觉,可是最后还是有一行错误

error: cannot find input file: `Makefile.in'

想继续发扬装没看见的优良传统,直接

make

不料压根找不到make文件,算了,从头来过

我估计是安装包有问题,从这里http://ftp.gnome.org/pub/gnome/sources/glib/2.44/glib-2.44.1.tar.xz下载新的安装包

这次不放根目录了,放在usr目录下

然后tar xvJf glib-2.44.1.tar.xz解压

然后

cd glib-2.44.1

./configure

我了个大去,竟然没有报错,我之前都干了神马!!!

赶紧的

make

然后

make install

看着一行行的输出,真的好爽,最后来张图

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: