vim:无法加载库 libpython

2024-04-24

我不让 vim 与 python 支持一起工作。我使用以下配置编译 vim 7.4.972:

./configure --enable-shared --with-features=huge --enable-multibyte --enable-cscope
    --enable-rubyinterp=yes --enable-pythoninterp=yes --enable-python3interp=yes
    --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=auto
    --enable-gtk2-check --enable-gnome-check --prefix=/home/me/tools/
    --with-global-runtime=/home/me/tools/share/vim/vim74 --with-lua-prefix=/home/me/tools
    --with-luajit --enable-fail-if-missing -with-x | tee vim_conf.log

关于 python 的输出是:

checking --enable-pythoninterp argument... yes
checking for python2... /sw/python/anaconda/bin/python2
checking Python version... 2.7
checking Python is 2.3 or better... yep
checking Python's install prefix... /sw/python/anaconda
checking Python's execution prefix... /sw/python/anaconda
checking Python's configuration directory... /sw/python/anaconda    /lib/python2.7/config
checking if -pthread should be used... yes
checking if compile and link flags for Python are sane... yes
checking --enable-python3interp argument... yes
checking for python3... /sw/python/anaconda3-2.2.0/bin/python3
checking Python version... 3.4
checking Python is 3.0 or better... yep
checking Python's abiflags... m
checking Python's install prefix... /sw/python/anaconda3-2.2.0
checking Python's execution prefix... /sw/python/anaconda3-2.2.0
checking Python's configuration directory... /sw/python/anaconda3-2.2.0    /lib/python3.4/config-3.4m
checking if -pthread should be used... yes
checking if compile and link flags for Python 3 are sane... yes
checking whether we can do without RTLD_GLOBAL for Python... yes
checking whether we can do without RTLD_GLOBAL for Python3... yes

vim --version 显示:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 16 2015 10:47:42)
Included patches: 1-972
Compiled by ziereisen@l57
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      +python3/dyn     +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    +xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/home/ziereisen/tools/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12   -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/gnome-keyring-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/libxml2     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc -L/lib64    -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/sw/perl5/lib/5.8.8/x86_64-linux-thread-multi-ld/CORE   -L/usr/local/lib -Wl,--as-needed -o vim   -L/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -L/lib64   -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-keyring -lxml2 -lz -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lbonobo-2 -lgnomevfs-2 -lbonobo-activation -lgconf-2 -lgobject-2.0 -lORBit-2 -lm -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -lncurses -lelf -lnsl  -lselinux   -lacl -lattr -lgpm  -L/home/ziereisen/tools/lib -lluajit-5.1 -Wl,-E -Wl,-rpath,/sw/perl5/lib/5.8.8/x86_64-linux-thread-multi-ld/CORE  -L/usr/local/lib /sw/perl5/lib/5.8.8/x86_64-linux-thread-multi-ld/auto/DynaLoader/DynaLoader.a -L/sw/perl5/lib/5.8.8/x86_64-linux-thread-multi-ld/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc    -lruby -lpthread -ldl -lcrypt -lm  -L/usr/lib64   

但是如果我启动 vim 并尝试命令 py print(1) 或 py3 print(1) 我总是收到消息:

E370: Could not load library libpython2.7.so.1.0
E263: Sorry, this command is disabled, the Python library could not be loaded.

or

E370: Could not load library libpython3.4m.so.1.0
E263: Sorry, this command is disabled, the Python library could not be loaded.

尝试添加lib目录到/etc/ld.so.conf和跑步ldconfig。另一种可能的解决方案可能是将目录添加到LD_LIBRARY_PATH环境变量。 ——杰森

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

vim:无法加载库 libpython 的相关文章

随机推荐

  • 如何在node.js中关闭数据库连接?

    当我关闭数据库连接时node js我收到这个错误 Cannot enqueue Query after invoking quit 这是我的code socket on adminConnect function email connect
  • Java 大型数据库插入

    我有一个数据库 需要在其中插入批量数据 一次大约 500k 条记录 我正在使用 derby 进行测试 发现这么多记录的插入时间约为 10 15 分钟 我正在用 Java 进行批量插入 这次看起来是否很慢 在普通笔记本电脑上工作 有没有办法加
  • 在 SQL Server 的 select 语句中使用带有 TOP 的变量,而不使其动态化 [重复]

    这个问题在这里已经有答案了 declare top int set top 5 select top top from tablename 是否可以 或者对这样的逻辑有什么想法 我不想使用动态查询 是的 在 SQL Server 2005
  • 避免 Firebase 可调用函数的 CORS 预检

    我有一个Firebase 可调用云函数 https firebase google com docs functions callable我在浏览器中的 javascript 应用程序中调用它 由于请求主机是 cloudfunctions
  • Spring自动装配参数化集合

    大家好 感谢您提前的帮助 我遇到一个问题 Spring 无法自动装配 ArrayBlockingQueue 类型的参数化成员变量 这是java代码 Controller public class SomeController Autowir
  • WPF 使用凭据启动浏览器

    我正在使用 WPF 和 C 我希望能够启动一个浏览器窗口 最有可能是 IE 并提供已知的凭据 以便基于 Windows 的应用程序可以处理从自身到外部浏览器的转换 而无需用户再次输入他 她的凭据 我确实知道如何启动浏览器 System Di
  • 仅在模块中加载 Yii Bootstrap

    我尝试仅在管理模块中加载 Yii Bootstrap 扩展 但它不起作用 我假设我需要预加载它或以某种方式启动它 谢谢 class AdminModule extends CWebModule public function init im
  • UIWebView 不断尝试加载但没有结果

    我正在尝试使用 UIWebView 连接到 wikiTravel 页面 这是我的代码 NSURL url NSURL URLWithString http wikitravel org en Beijing NSURLRequest req
  • 从命令行运行 Jupyter Notebook (.ipynb),就像它是 .py 文件一样

    我正在本地计算机上编写 Jupyter 笔记本 该笔记本最终将在远程服务器 运行 Ubuntu 上运行 每次我需要进行更改时 我都必须将笔记本导出为 py文件 然后从服务器的命令行调用它 我希望能够即时运行它 调用一个命令来获取当前的 ip
  • Gmail 的操作邮件程序配置

    我正在尝试将使用 Gmail SMTP 的电子邮件传送添加到我的应用程序中 我之前已经完成了 不太安全的应用程序 方式 但我不想在这个项目中使用此选项 我试图查看谷歌的文档或一些宝石以使其工作 但无济于事 每个人都只是发送一些代码 如下所示
  • 使背景图像与屏幕大小相同

    我希望背景图像填满屏幕 并且不担心失去宽高比 已经证实了一切 不要认为我错过了任何明显的事情 HTML phone margin auto height 737px width 654px background image url imgs
  • 比较sql server中两个字符串中的数字

    我有两个字符串作为 CountryLocationIDs 和 LocationIDs 其值 CountryLocationIDs 400 600 150 850 160 250 LocationIDs1 600 150 900 然后我需要另
  • 如何为特定用户选择最后一行?

    我有一个这样的表 requests id id user unix time 1 2353 1339412843 2 2353 1339412864 3 5462 1339412894 4 3422 1339412899 5 3422 13
  • 我的 Rails 路由应该是什么样子才能与 pushState Ember.js 路由一起使用?

    简而言之 当构建 Ember js 应用程序以持久保存到 Rails 应用程序时 我应该如何处理 Rails 路由 视图 我想我只需要 Rails 来渲染 application html erb 布局 以便 Ember js 应用程序初始
  • 如何修复 Chrome 扩展程序“未捕获的引用错误:文档未定义”错误? [复制]

    这个问题在这里已经有答案了 我正在创建一个扩展 我希望它能够在任何网站上找到特定的单词并突出显示它们 但是 在加载扩展程序后 我立即收到一条错误消息 有谁知道如何解决这一问题 我的代码如下 背景 js chrome runtime onIn
  • ffmpeg drawtext如何设置从右到左的方向

    i write arabic text to videos and it works fine but the issue is that the arabic language is written from right to left
  • 使用 MinMax 和 Alpha-Beta 剪枝找到最佳移动

    我正在为游戏开发 AI 我想使用MinMax算法与Alpha Beta 修剪 我对它的工作原理有一个粗略的了解 但我仍然无法从头开始编写代码 所以我花了两天的时间在网上寻找某种伪代码 我的问题是 我在网上找到的每个伪代码似乎都是基于寻找最佳
  • 属于主键?

    我有一个像这样的数据库布局 Users id name etc Lead id initials etc 基本上一个用户有很多线索 这initials字段映射到name用户表中的字段 我对用户设置有一个完美的关系 has many lead
  • 在编译时将多个文件中的变量收集到单个连续的内存块中

    我想在多个 c 文件中定义 并初始化 结构体的多个实例 但我希望它们在编译时收集到一个连续的数组中 我一直在研究使用自定义部分并使用该部分的开始和结束地址作为结构数组的开始和结束 但我还没有完全弄清楚细节 而且我不想编写自定义部分链接器脚本
  • vim:无法加载库 libpython

    我不让 vim 与 python 支持一起工作 我使用以下配置编译 vim 7 4 972 configure enable shared with features huge enable multibyte enable cscope