Python 3.4 lib 文件名是什么?

Python 3.4 lib 文件名是什么?

我有 Ubuntu 14.4。我想加载 Py3.4 库(Lazarus 代码),但我不知道.so文件名。我通过 find-file 看到了几个文件:

  • libpython3.4.so
  • libpython3.4m.so
  • libpython3.4m.so.1

(每个文件都在其自己的文件夹中)。使用什么文件名?我必须查看哪个文件夹?

答案1

步骤 1:共享对象似乎在哪里?

schadenfreude@oubliette:~$ locate libpython3.4  | grep /usr/lib | grep so
/usr/lib/debug/usr/lib/libpython3.4m.so.1.0-gdb.py
/usr/lib/debug/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0  
/usr/lib/python3.4/config-3.4dm-x86_64-linux-gnu/libpython3.4.so  
/usr/lib/python3.4/config-3.4dm-x86_64-linux-gnu/libpython3.4dm.so  
/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4.so  
/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/libpython3.4m.so  
/usr/lib/x86_64-linux-gnu/libpython3.4dm.so  
/usr/lib/x86_64-linux-gnu/libpython3.4dm.so.1  
/usr/lib/x86_64-linux-gnu/libpython3.4dm.so.1.0  
/usr/lib/x86_64-linux-gnu/libpython3.4m.so  
/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1  
/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0  

第 2 步:这些东西到底指向哪里?

schadenfreude@oubliette:~$ ls -la /usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/ | grep libpython3.4 | grep so  
lrwxrwxrwx  1 root root       41 Apr 11  2014 libpython3.4m.so -> ../../x86_64-linux-gnu/libpython3.4m.so.1  
lrwxrwxrwx  1 root root       41 Apr 11  2014 libpython3.4.so -> ../../x86_64-linux-gnu/libpython3.4m.so.1  

schadenfreude@oubliette:~$ ls -la /usr/lib/x86_64-linux-gnu/ | grep libpython3.4 | grep so
lrwxrwxrwx   1 root root       19 Apr 11  2014 libpython3.4dm.so -> libpython3.4dm.so.1  
lrwxrwxrwx   1 root root       21 Apr 11  2014 libpython3.4dm.so.1 -> libpython3.4dm.so.1.0  
-rw-r--r--   1 root root  8669406 Apr 11  2014 libpython3.4dm.so.1.0  
lrwxrwxrwx   1 root root       18 Apr 11  2014 libpython3.4m.so -> libpython3.4m.so.1  
lrwxrwxrwx   1 root root       20 Apr 11  2014 libpython3.4m.so.1 -> libpython3.4m.so.1.0  
-rw-r--r--   1 root root  4292408 Apr 11  2014 libpython3.4m.so.1.0  

所以,不仅仅是一个链接/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0

相关内容