【问题标题】:debian: mysql-workbench installation error [cannot find -lpython2.7.a]debian:mysql-workbench安装错误[找不到-lpython2.7.a]
【发布时间】:2012-12-17 15:56:53
【问题描述】:

我正在尝试从 Linux debian 2.6.32-5-amd64 上的源代码安装 mysql-workbench-gpl-5.2.45。问题出现在“make”步骤并带有错误消息:

/usr/bin/ld: cannot find -lpython2.7.a
collect2: ld returned 1 exit status
make[4]: *** [libgrt.la] Error 1
make[4]: Leaving directory `/home/user/data/workbench/mysql-workbench-gpl-5.2.45-src/library/grt/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/user/data/workbench/mysql-workbench-gpl-5.2.45-src/library/grt'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/data/workbench/mysql-workbench-gpl-5.2.45-src/library'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/data/workbench/mysql-workbench-gpl-5.2.45-src'
make: *** [all] Error 2

出错前的最后一个make命令是:

make[4]: Entering directory `/home/user/data/workbench/mysql-workbench-gpl-5.2.45-src/library/grt/src'
/bin/bash ../../../libtool --tag=CXX   --mode=link g++  -Wextra -Wall -Wno-unused -Wno-deprecated    -DTIXML_USE_STL=1   -o libgrt.la -rpath /usr/local/lib/mysql-workbench grtpp_grt.lo grtpp_helper.lo grtpp_metaclass.lo grtpp_util.lo grtpp_value.lo grtpp_shell.lo grtpp_shell_lua.lo grtpp_shell_lua_help.lo grtpp_module.lo grtpp_module_cpp.lo grtpp_module_lua.lo grtpp_notifications.lo lua_context.lo serializer.lo unserializer.lo grtpp_undo_manager.lo changefactory.lo changelistobjects.lo diffchange.lo grtdiff.lo grtlistdiff.lo grtpp_module_python.lo grtpp_shell_python.lo grtpp_shell_python_help.lo python_context.lo python_grtdict.lo python_grtlist.lo python_grtobject.lo python_module.lo -llua5.1   -luuid -pthread -Wl,--export-dynamic -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lxml2 -lsigc-2.0 -llua5.1   -luuid -L/usr/local/lib -lpython2.7.a ../../../library/base/libwbbase.la 

libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbeginS.o  .libs/grtpp_grt.o .libs/grtpp_helper.o .libs/grtpp_metaclass.o .libs/grtpp_util.o .libs/grtpp_value.o .libs/grtpp_shell.o .libs/grtpp_shell_lua.o .libs/grtpp_shell_lua_help.o .libs/grtpp_module.o .libs/grtpp_module_cpp.o .libs/grtpp_module_lua.o .libs/grtpp_notifications.o .libs/lua_context.o .libs/serializer.o .libs/unserializer.o .libs/grtpp_undo_manager.o .libs/changefactory.o .libs/changelistobjects.o .libs/diffchange.o .libs/grtdiff.o .libs/grtlistdiff.o .libs/grtpp_module_python.o .libs/grtpp_shell_python.o .libs/grtpp_shell_python_help.o .libs/python_context.o .libs/python_grtdict.o .libs/python_grtlist.o .libs/python_grtobject.o .libs/python_module.o   -Wl,-rpath -Wl,/home/user/data/workbench/mysql-workbench-gpl-5.2.45-src/library/base/.libs -Wl,-rpath -Wl,/usr/local/lib/mysql-workbench /usr/lib/libgthread-2.0.so /usr/lib/libgmodule-2.0.so -lrt /usr/lib/libglib-2.0.so /usr/lib/libxml2.so /usr/lib/libsigc-2.0.so /usr/lib/liblua5.1.so -luuid -L/usr/local/lib -lpython2.7.a ../../../library/base/.libs/libwbbase.so -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. -L/usr/lib/x86_64-linux-gnu -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crtn.o  -pthread -Wl,--export-dynamic   -pthread -Wl,-soname -Wl,libgrt.so.0 -o .libs/libgrt.so.0.0.0

我已检查图书馆位置:

locate lpython2.7.a

结果是:

/usr/local/lib/lpython2.7.a

python2.7.3 在这里下载: http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2

python2.7.3安装步骤:

tar -xvjpf Python-2.7.3.tar.bz2 && cd Python-2.7.3 && ./configure && make && make install

任何想法为什么 WB 找不到图书馆?

【问题讨论】:

  • 您能否发布实际调用链接器的命令(从而产生错误)? -lpython2.7.a 真正的意思是“链接到libpython2.7.a.so”,但似乎构建过程有点混乱,并试图将参数用作文件名。
  • 错误前的最后一个 make 命令被添加到主帖中。提前致谢

标签: linux python-2.7 debian mysql-python mysql-workbench


【解决方案1】:

问题解决了。在安装 mysql-workbench 之前,正确安装 python2.7 很重要。此处安装说明:https://gist.github.com/1069219

【讨论】:

    猜你喜欢
    • 2012-11-15
    • 2012-01-14
    • 2013-07-27
    • 2017-10-01
    • 2018-12-19
    • 2015-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多