无法在 Ubuntu 12.04 上安装 cint

无法在 Ubuntu 12.04 上安装 cint

我正在尝试建立辛特来自 Ubuntu 12.04 上的源代码。然而它抱怨libreadline

~/Desktop/cint-5.18.00 » ./configure      
Guessing architecture to be linuxx8664gcc
Using current CINT core
Please install the package "libreadline or [lib]readline-dev[el]"!

我有libreadline6libreadline-devlibreadline6-dev已安装。我应该怎么做?

编辑:

使用--readlinelib下面的选项我可以运行configuremake并且make install

/usr/local/include/cint
/usr/local/include/cint/cintdictversion.h
/usr/local/include/cint/configcint.h
/usr/local/share/cint
/usr/local/share/cint/cint
/usr/local/share/cint/cint/lib/qt/qtcint.h
/usr/local/share/cint/cint/lib/wintcldl83/cintlib.c
/usr/local/share/cint/cint/lib/socket/cintsock.h
/usr/local/share/cint/cint/lib/socket/cintsock.c
/usr/local/share/cint/cint/lib/dll_stl/cinteh.h
/usr/local/share/cint/cint/lib/win32api/cintwin.h
/usr/local/share/cint/cint/lib/gl/cintGL.h
/usr/local/share/cint/cint/lib/cintocx
/usr/local/share/cint/cint/lib/cintocx/cintocx.aps
/usr/local/share/cint/cint/lib/cintocx/cintocx.h
/usr/local/share/cint/cint/lib/cintocx/cintocx.cpp
/usr/local/share/cint/cint/lib/cintocx/cintocx.ico
/usr/local/share/cint/cint/lib/cintocx/CintocxCtl.cpp
/usr/local/share/cint/cint/lib/cintocx/CintocxCtl.bmp
/usr/local/share/cint/cint/lib/cintocx/cintocx3.bmp
/usr/local/share/cint/cint/lib/cintocx/cintocx.clw
/usr/local/share/cint/cint/lib/cintocx/CintocxCtl.h
/usr/local/share/cint/cint/lib/cintocx/CintocxPpg.h
/usr/local/share/cint/cint/lib/cintocx/cintocx.mdp
/usr/local/share/cint/cint/lib/cintocx/cintocx.odl
/usr/local/share/cint/cint/lib/cintocx/CintocxPpg.cpp
/usr/local/share/cint/cint/lib/cintocx/cintocx.mak
/usr/local/share/cint/cint/lib/cintocx/Cint-Ocx
/usr/local/share/cint/cint/lib/cintocx/cintocx.rc
/usr/local/share/man/man1/makecint.1
/usr/local/share/man/man1/cint.1
/usr/local/lib/libCint.so
/usr/local/lib/libCint_static.a
/usr/local/lib/clang/3.5/include/f16cintrin.h
/usr/local/bin/cint
/usr/local/bin/cint-config
/usr/local/bin/makecint

但是当我尝试运行它时我得到了:

~/Desktop/cint-5.18.00 » cint
cint: error while loading shared libraries: libCint.so: cannot open shared object file: No such file or directory

谢谢

答案1

  • 使用以下方式搜索共享库:

    locate libreadline.so
    

    然后使用--readlinelib选项运行 configure:

    ./configure --readlinelib=/lib/x86_64-linux-gnu/libreadline.so.6 --prefix=/usr/local
    make
    sudo make install
    
  • 如果 cint 找不到共享库libCint.so

    sudo ln /usr/local/lib/libCint.so /usr/lib/libCint.so
    

    或者你可以添加/usr/local/lib到 ld 加载路径:

    sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/usr-local.conf
    sudo ldconfig
    

    但请记住,不建议这样做,本地安装的库可能与分发安装的库冲突。因此,如果遇到此类问题,请改为创建链接。

  • 如果不起作用。有多个 readline lib 版本。看看它们是否有效。

    如果你的操作系统是 64 位,请安装:

    sudo apt-get install lib64readline6-dev:i386
    

    我已经检查过了,确实有效。否则,检查另一个 32 位版本:

    sudo apt-get install lib32readline6-dev
    

答案2

如何将 cint 安装到 64 位 Ubuntu 12.10 机器上。以下是我操作的方法:

  1. 创建新目录/home/el/foo

  2. 进入目录并检出最新和最好的内容:

    svn co http://root.cern.ch/svn/root/branches/v5-34-00-patches/cint cint
    cd cint
    sudo apt-get install libreadline-dev
    ./configure --readlinelib=/lib/x86_64-linux-gnu/libreadline.so.6.2 --prefix=/usr/local
    
    make
    sudo make install
    sudo ln /usr/local/lib/libCint.so /usr/lib/libCint.so
    
  3. 然后运行它:

    el@apollo:~/foo/cint$ cint
    
    cint : C/C++ interpreter  (mailing list '[email protected]')
       Copyright(c) : 1995~2010 Masaharu Goto ([email protected])
       revision     : 5.18.00, July 2, 2010 by M.Goto
    
    No main() function found in given source file. Interactive interface started.
    'h':help, 'q':quit, '{statements;}' or 'p [expr]' to evaluate
    
    cint> sin(1.2);
    (const double)1.19999999999999996e+00
    
  4. 主站点上有教程。

    cint> printf("ok");
    (const char* 0x16bef60)"ok"
    

相关内容