第一次在linux下安装CUDD包及遇见的问题

来源:互联网 发布:uu淘宝店 编辑:程序博客网 时间:2024/06/10 04:57
(一) 下载CUDD安装包

    在ftp://vlsi.colorado.edu/pub/上面可以下载到;

        ftp domain.comftp 192.168.0.1ftp user@ftpdomain.com


    可以用来登陆ftp;进入ftp服务器之后可以用常用的linux命令来操作,如ls,cd等;


    在下载一个文件之前,我们首先需要使用lcd命令设定本地接受目录位置。


lcd /home/user/yourdirectoryname

  

    如果不设置的话,则默认下载到你进入ftp时的目录;

    现在,可以使用命令 get 来下载文件,比如:


get filename

    完成FTP工作后,为了安全起见需要关闭连接。有三个命令可以关闭连接;


        byeexitquit

    下载完成后,需要解压文件:


gzip -dc cudd-3.0.0.tar.gz | tar xvf -

    最后进入cudd-3.0.0文件夹准备安装。



(二)  安装CUDD包


    首先进入文件夹后,里面会有一个README文件,需要自己读一下,里面有安装的参数;

    里面先介绍了一种简单安装的方案:


./configuremakemake check

     我把这些东西输入之后一大串,当时没有自己关注;然后我建了一个c文件,里面包含#include"cudd.h"报错,

    我以为是没有安装好,其实当时应该已经安装好了。

    然后我就开始用文件里给的第二个方法:

./configure CC=clang CXX-clang++ --enabl        e-sient-rules \--enable-shared --enable-objmake -j4 checkmake install

           当时也不知道CC和 CXX是什么意思;看着一大串估计安装好了,但是测试还是不行;我回头看了下具体的输             出,     发现configure就出错了,

     显示Invalid configuration `CXX-clang++'然后我把这个参数去掉并换成挨个输入:

./configure --enable-sient-rules --enable-s hared --enable-obj --enable-dddmp

 

      看到信息,已经正确configure;

    然后:

make -j4 check


       也显示出了正确;


    最后:

make install

       但是显示有错误:

make[1]: *** [install-libLTLIBRARIES] Error 1


       回头找错误信息:

/usr/bin/install: cannot create regular file '/usr/local/lib/libcudd.la': Permission denied

       原来是cudd文件夹里面有我的权限不能操作的文件,然后用:


sudo make install

      正确安装完成!

    但是还没有结束~~~


(三)最后设置环境变量


    我测试后还是不行,然后我学会看信息了,发现下面一段说明:


Libraries have been installed in:   /usr/local/libIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the `-LLIBDIR'flag during linking and do at least one of the following:   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable     during execution   - add LIBDIR to the `LD_RUN_PATH' environment variable      during linking    - use the `-Wl,-rpath -Wl,LIBDIR' linker flag    - have your system administrator add LIBDIR to `/etc/ld.so.conf'


       然后我意识到是因为系统没有默认到/usr/local/lib下面去找库文件,解决方法是:

    在 /etc/ld.so.conf.d 下新建一个文件 local.conf,里边写上 /usr/local/lib。然后以 root 权限执行         ldconfig。这样你的系统才会找得到安装到 /usr/local/lib 下的库文件。


到此大功告成,测试也成功了!!!

原创粉丝点击