zoukankan      html  css  js  c++  java
  • Linux系统(ubuntu14.04) 下安装glib-2.44.1调试工具的过程研究

          有很多人,问我你发的博文每次为什么都是没有解决的问题呢?你老是发这些没有解决的问题出来,不是在误导大家吗?哈哈,我想说我不是在误导大家,我只是在加深大家的记忆而已,在干这个事情中间遇到了什么问题,需要注意什么,以防止下次遇到问题之后,不知道所以然,不知道怎么去分析问题,这次是我发表文章的初衷。望大家能够理解。

          我在写正文之前先把正确的方法贴出来:

          在我们博客园也有同学发表过类似的文章,当然我也是有参考人家的文章啦:

          博客园:http://www.cnblogs.com/chasonzhang/p/4532934.html

          其次,我们就要贴出这个调试工具的下载地址了,

          地址:https://github.com/GNOME/glib

         哈哈,即将开始我们的一连串报错之旅吧!

          一、安装autoconf

         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

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

          

  • 相关阅读:
    算法练习:求字符串的最长重复子串(Java实现)
    Oracle数据库中遇到的坑
    解决Oracle死锁问题步骤
    转:Spring Cache抽象详解
    Spring MVC测试框架详解——服务端测试
    转:SpringMVC中日期格式的转换
    freemarker判断是否为空
    jQuery Pagination分页插件
    Java链式方法
    mysql强制索引和禁止某个索引
  • 原文地址:https://www.cnblogs.com/huiyenashen/p/4533710.html
Copyright © 2011-2022 走看看