2015-12-16 9 views
6

मुझे पायथन समर्थन के साथ काम करने के लिए विम नहीं मिलता है। मैं निम्नलिखित विन्यास के साथ vim 7.4.972 संकलन:vim: लाइब्रेरी libpython लोड नहीं किया जा सका

./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 

अजगर के बारे में उत्पादन होता है:

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 [email protected] 
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 प्रिंट (1) मुझे हमेशा संदेश मिलते हैं:

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

या

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

मैं विचारों कि समस्या क्या है से बाहर चल रहा हूँ। मैं चारों ओर googled लेकिन कोई समाधान नहीं मिला। मुझे उम्मीद है कि यहां कोई मुझे संकेत दे सकता है।

सादर,

माइक

+0

क्या आपने चेक किया है 'libpython' 'ld.so.conf' निर्देशिका में है? – Jason

+1

'$ ldd /sw/python/anaconda-1.9.1/bin/python2 libpython2.7.so.1.0 => /sw/python/anaconda-1.9.1/bin /../ lib' – maikelmeyers

+0

मैं डॉन ' टी पता है कि vim में पाइथन पुस्तकालय पथ के लिए कैसे खोज करता है। अगर मैं इस पायथन को खोल में शुरू करता हूं, तो यह पुस्तकालय पाता है। – maikelmeyers

उत्तर

0

/etc/ld.so.conf को lib निर्देशिका जोड़ने और ldconfig चलाने की कोशिश करें। एक और संभावित समाधान निर्देशिका को LD_LIBRARY_PATH पर्यावरण चर में जोड़ सकता है। –   जेसन

संबंधित मुद्दे