【问题标题】:ImportError: No module named 'libstdcxx' when starting Eclipse debugger [duplicate]ImportError:启动 Eclipse 调试器时没有名为“libstdcxx”的模块[重复]
【发布时间】:2016-04-22 14:05:34
【问题描述】:

当我在 Linux 中运行 Eclipse CDT 调试器时,我在 GDB 控制台中看到以下错误:

The target endianness is set automatically (currently little endian)
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'

这是什么意思,我可以修复它,我应该修复它吗?

【问题讨论】:

标签: linux eclipse gcc gdb eclipse-cdt


【解决方案1】:

这已在较新版本的 libstdc++6 中得到修复。现在,编辑 libstdc++.so.6.0.19-gdb.py 文件以进行这些更改(来自 Ubuntu 14.04 的示例):

*** libstdc++.so.6.0.19-gdb.py.orig 2015-05-14 11:41:01 -0700
--- libstdc++.so.6.0.19-gdb.py 2016-01-17 08:00:54 -0800
***************
*** 49,54 ****
      # Compute the ".."s needed to get from libdir to the prefix.
!     backdirs = len (libdir.split (os.sep))
!     if not os.path.basename(os.path.dirname(__file__)).startswith('lib'):
!         backdirs += 1 # multiarch subdir
!     dotdots = ('..' + os.sep) * backdirs

--- 49,51 ----
      # Compute the ".."s needed to get from libdir to the prefix.
!     dotdots = ('..' + os.sep) * len (libdir.split (os.sep))

【讨论】:

    猜你喜欢
    • 2017-01-07
    • 2018-05-30
    • 2014-10-31
    • 2021-11-07
    • 2017-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-30
    相关资源
    最近更新 更多