ubuntu mtd-utils

来源:互联网 发布:数据库数据太多 编辑:程序博客网 时间:2024/06/06 02:52

1 get the mtd-utils source code form the net through git clone or another way.

2 if has same problem about uuid ,then do:

切换到12.04下之后通过apt-get install uuid-dev安装uuid之后,之前的代码中的uuid_generate,uuid_unparse函数在新的库中不存在了(和10.04中的uuid-dev不是同一个包),导致链接失败。

为了不改动原有自己已写好的程序,只有找原先的uuid lib。解决方案如下:

在https://answers.launchpad.net/ubuntu/+source/util-linux/2.20.1-1ubuntu1中下载到util-linux_2.20.1.orig.tar.gz包,里面包含很多系统工具的目录,如包含libuuid目录。使用下面的方法安装uuid库(包括静态lib文件及动态链接文件):

tar xzvf util-linux_2.20.1.orig.tar.gz
cd util-linux-2.20.1
./configure --without-ncurses
cd libuuid
make
make install


3 when I update the mtd-utils code,I can't find the Makefile rules file.So I must to do something to born the Makefile.

1. 执行aclocal,产生aclocal.m4文件

2. 执行autoconf,生成configure文件

3. 执行automake命令,产生Makefile.in

4. 执行configure命令,生成Makefile文件

这样,就产生了编译所需要的Makefile文件。运行make,即可编译



这里在进行第四步的时候很可能会遇到一个问题:

error: C++ preprocessor "/lib/cpp" fails sanity checkSee `config.log' for more details.
  • 1
  • 2

出现该情况是由于c++编译器的相关package没有安装。
以Ubuntu为例,解决如下:

#sudo apt-get install build-essential

0 0
原创粉丝点击