pyuno在libreoffice中缺少符号并且不能与python2一起使用

时间:2018-10-31 16:53:31

标签: python libreoffice pyuno

我已经使用gcc 4.9.1从Linux上的源代码安装了Libreoffice版本6.0.4.2。 当我尝试在python2中导入uno时,出现错误消息。动态模块未定义初始化函数(initpyuno)

Python 2.7.11 |Anaconda custom (64-bit)| (default, Dec  6 2015, 18:08:32) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import pyuno
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (initpyuno)
>>> 

但这在python3上很好用。

Python 3.6.5 |Anaconda custom (64-bit)| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyuno
>>> exit()

经过调查,我发现在pyuno.so中没有使用符号initpyuno。

programnm -D pyuno.so 
                 U abort
0000000000201078 B __bss_start
                 w __cxa_finalize
                 U dladdr
                 U dlclose
                 U dlerror
                 U dlopen
                 U dlsym
0000000000201078 D _edata
0000000000201080 B _end
0000000000000b2c T _fini
                 U fprintf
                 U free
                 w __gmon_start__
00000000000007f0 T _init
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
                 w _Jv_RegisterClasses
                 U malloc
0000000000000b0c T PyInit_pyuno
                 U stderr
                 U strncpy
                 U strrchr

有人可以帮助我如何在库中丢失符号吗?

0 个答案:

没有答案