Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't run gdb on ubuntu: Could not find platform independent libraries

Tags:

c

ubuntu

gdb

Can't run 'gdb ./a.out' or even 'gdb --help' without getting:

$ gdb ./a.out 
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

Ubuntu Desktop 12.04 LTS is up to date. Works in 'root'. I'd rather not hardcode a $PYTHONHOME location. Any hints appreciated. Baffled.

update: when I set $PYTHONHOME I get:

$ PYTHONHOME=/usr/lib/python2.7 gdb ./a.out 
ImportError: No module named site

update: I do have python-dev installed for native module creation.

Thx

like image 363
navicore Avatar asked Dec 06 '25 03:12

navicore


1 Answers

Could you be running into this bug? Do you have python and python-libs installed?

like image 141
Digital Trauma Avatar answered Dec 07 '25 17:12

Digital Trauma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!