Software-Installation

警告:在庫中找不到宏“AM_GLIB_GNU_GETTEXT”

  • January 25, 2022

我正在嘗試通過 git安裝soundconverter 。這就是我在終端所做的:

$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get install git
$ git clone https://github.com/kassoulet/soundconverter.git
$ cd soundconverter 
$ ./autogen.sh

這是執行的輸出/home/USERNAME/soundconverter/autogen.sh

*** WARNING: I am going to run 'configure' with no arguments.
*** If you wish to pass any to it, please specify them on the
*** './autogen.sh' command line.

configure.ac:22: warning: macro 'AM_GLIB_GNU_GETTEXT' not found in library
aclocal: installing 'm4/intltool.m4' from '/usr/share/aclocal/intltool.m4'
aclocal: installing 'm4/nls.m4' from '/usr/share/aclocal/nls.m4'
./autogen.sh: 27: ./autogen.sh: glib-gettextize: not found

研究失去的包裹

當您對此有所了解時,這是您的問題:

configure.ac:22: warning: macro 'AM_GLIB_GNU_GETTEXT' not found in library
aclocal: installing 'm4/intltool.m4' from '/usr/share/aclocal/intltool.m4'
aclocal: installing 'm4/nls.m4' from '/usr/share/aclocal/nls.m4'
./autogen.sh: 27: ./autogen.sh: glib-gettextize: not found

此消息告訴您缺少庫。這個庫的內部邏輯名稱是這樣的:AM_GLIB_GNU_GETTEXT.

搜尋它會引導您找到許多這樣的執行緒:

易於

在我們開始查找之前,讓我們確保我們的apt-file記憶體已更新:

$ sudo apt-file update

現在讓我們看看 APT 是什麼:

$ apt-file search glib-gettextize
libglib2.0-dev: /usr/bin/glib-gettextize
libglib2.0-dev: /usr/share/man/man1/glib-gettextize.1.gz
libglib2.0-doc: /usr/share/doc/libglib2.0-doc/glib/glib-gettextize.html

很好,所以包的名稱是libglib2.0-dev. 這與我們之前的Google搜尋返回的內容相吻合。

我們可以戳這個包,看看它是否有.m4我們似乎失去的文件:

$ apt-file list libglib2.0-dev | grep '.m4$'
libglib2.0-dev: /usr/share/aclocal/glib-2.0.m4
libglib2.0-dev: /usr/share/aclocal/glib-gettext.m4
libglib2.0-dev: /usr/share/aclocal/gsettings.m4

很好,所以有一個正在尋找的.m4宏文件。configure所以讓我們安裝它:

$ sudo apt-get install -y libglib2.0-dev

**注意:**安裝後,您可以使用以下命令查詢已安裝的軟體包dpkg

$ dpkg-query -L libglib2.0-dev | grep m4
/usr/share/aclocal/glib-2.0.m4
/usr/share/aclocal/gsettings.m4
/usr/share/aclocal/glib-gettext.m4

參考

引用自:https://unix.stackexchange.com/questions/456458