首页 > 解决方案 > 导入 clr 给出未解析的符号

问题描述

安装pythonnet 2.4.0后,和mono

(dash_apps_36) idf@ubvm:~/Documents/python/PythonWrapper.For.CS$ mono --version
Mono JIT compiler version 6.4.0.198 (tarball Tue Sep 24 01:21:28 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    Interpreter:   yes
    LLVM:          yes(610)
    Suspend:       hybrid
    GC:            sgen (concurrent by default)

我创建了一个单行程序:

import clr

当我运行它时,我得到一个错误:

(dash_apps_36) idf@ubvm:~/Documents/python/PythonWrapper.For.CS$ python testclr.py 
Traceback (most recent call last):
  File "testclr.py", line 1, in <module>
    import clr
ImportError: /usr/lib/libmonosgen-2.0.so.1: undefined symbol: _ZTIPi

标签: monoclrpython-3.7python.net

解决方案


推荐阅读