我试图在OSX Mavericks上从源代码安装osm2pgsql。我按照自述文件中的基本步骤操作,但是当我尝试运行./autogen.sh时,我得到了一个libtool错误:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
Can't exec "libtoolize": No such file or directory at /usr/local/share/autoconf/Autom4te/FileUtils.pm line 345, line 4.
autoreconf: failed to run libtoolize: No such file or directory
autoreconf: libtoolize is needed because this package uses Libtool
我已经安装了所有依赖项,并拥有最新版本的autoconf和automake。无法弄清楚为什么它找不到libtoolize。如果我运行locate libtoolize,我可以看到它已安装。
发生了什么?
更新
根据第一条评论中的建议,我尝试将以下行添加到autogen.sh
脚本中:
case `uname` in Darwin*) glibtoolize --copy ;; *) libtoolize --copy ;; esac
这似乎进一步发展,但仍然陷入困境。这是终端输出:
$ ./autogen.sh && ./configure && make autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force Can't exec "libtoolize": No such file or directory at /usr/local/share/autoconf/Autom4te/FileUtils.pm line 345, line 4. autoreconf: failed to run libtoolize: No such file or directory autoreconf: libtoolize is needed because this package uses Libtool glibtoolize: putting auxiliary files in `.'. glibtoolize: copying file `./ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. glibtoolize: copying file `m4/libtool.m4' glibtoolize: copying file `m4/ltoptions.m4' glibtoolize: copying file `m4/ltsugar.m4' glibtoolize: copying file `m4/ltversion.m4' glibtoolize: copying file `m4/lt~obsolete.m4' -bash: ./configure: No such file or directory
仍然没有运气让它真正起作用...... 有什么帮助吗?
答案 0 :(得分:0)
试试这个:
(libtoolize --version)< / dev / null> / dev / null 2>& 1 || { ... }
gprefix = which glibtoolize 2>&1 >/dev/null
如果[$? -eq 0];然后
glibtoolize --force
其他
libtoolize --force
网络
4.run autogen.sh再次
答案 1 :(得分:0)
我必须在~/.bash_profile
中的$ PATH中添加libtoolize:
export PATH=/path/that/contains/libtoolize:$PATH
我使用locate libtoolize