What is libintl.h and where can I get it?

前端 未结 12 1512
半阙折子戏
半阙折子戏 2021-02-02 05:52

Trying to do a make install of git from source, and it keep kicking up the error:

 make install
* new build flags or prefix
CC credential-store.o
In file include         


        
相关标签:
12条回答
  • 2021-02-02 06:12

    I learned libintl comes from libgettext. If you already installed gettext by Homebrew, you would see:

    $ locate libintl
    /usr/local/Cellar/gettext/0.18.3.2/lib/libintl.8.dylib
    /usr/local/Cellar/gettext/0.18.3.2/lib/libintl.a
    /usr/local/Cellar/gettext/0.18.3.2/lib/libintl.dylib
    <..snip..>
    

    and the following works for me on the issue of "library not found for -lintl"

    ln -s /usr/local/Cellar/gettext/0.18.3.2/lib/libintl.* /usr/local/lib/
    
    0 讨论(0)
  • 2021-02-02 06:14

    Depending on the system, it's probably part of the GNU C library (glibc).

    Note that just installing the file libintl.h isn't likely to do you any good.

    On Debian-based systems (including Debian, Ubuntu, and Linux Mint), it's part of the libc6-dev package, installed with:

    sudo apt-get install libc6-dev
    

    Since you're using Mac OS X, a Google search for "libintl.h OSX" shows a lot of people having similar problems. According to the INSTALL file in the Git sources:

    Set NO_GETTEXT to disable localization support and make Git only use English. Under autoconf the configure script will do this automatically if it can't find libintl on the system.

    0 讨论(0)
  • 2021-02-02 06:17

    If you can find the proper version of Libtools (from http://ftp.gnu.org/gnu/libtool/) you might find it in the package..

    Otherwise you can use below to the configure to remove this dependency:

    ./configure --disable-nls
    
    0 讨论(0)
  • 2021-02-02 06:17

    When packages are looking for this file, install or build the GNU gettext package. This packages "installs" ${prefix}/include/libintl.h, among other things

    0 讨论(0)
  • 2021-02-02 06:17

    In order to install the newest version of git on OSX Lion this is what I did:

    *Note that if you do not have git already installed you can just download it from the site and unpack it in to ~/src/git

    I also recommend doing a whereis git to see if you already have it installed so you know what to set your prefix to. Mine was /usr/bin/git so I set my prefix to just /usr

    mkdir ~/src
    git clone https://github.com/git/git.git
    cd git
    make configure
    ./configure --prefix=/usr
    make
    make install
    

    By doing it this way I did not have to download any extra libraries or do any hunting on forums for answers. Thanks to automake I know that git is setup for my system and will run without any hiccups.

    0 讨论(0)
  • 2021-02-02 06:22

    FWIW on OSX with El Capitan and homebrew, I did a:

    1) I wasn't sure if the El Capitan upgrade had broken something, so first I made sure I had the latest gettext:

    $ brew reinstall gettext
    

    Then I had to re-link by doing:

    $ brew unlink gettext && brew link gettext --force
    

    After that, other tools were able to find it, and life went back to normal.

    0 讨论(0)
提交回复
热议问题