打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ubuntu14.04 下安装 glib
Ubuntu14.04 下安装 glib-2.44.1 的过程记录

安装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_AUTOMAKEIf 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 foundparallel-tests: installing './test-driver'automake: error: cannot open < gtk-doc.make: No such file or directoryautoreconf: automake failed with exit status: 1

忽略这个错误,再试试

autoreconf -fi

依然报错

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

继续装作没看见,运行

./configure

报错如下:

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

No package 'libffi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard PRefix.

Alternatively, you may set the environment variables LIBFFI_CFLAGSand 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

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

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Nginx安装解决报错
使用autoconf、automake等来制作一个以源代码形式(.tar.gz)发布的软件
根据configure.in和Makefile.am产生Makefile
QT中Makefile文件的修改
GLIB库:概述
SUSE10.2环境下gstreamer安装全记录
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服