My problem is fairly simple: running the 'python' command (not a script) on my raspberry pi model A+ running Raspbian Wheezy gives a segmentation fault:
pi@raspberrypi ~ $ python
Segmentation fault
I found quite a number of threads dealing with 'segmentation fault' in python scripts (often related to external C modules). Some others more specifically on raspberry pi were often speaking of 'segmentation fault' during an apt-get upgrade, involving a python module (here or there).
But those are not answering my problem.
Running it in gdb gave:
pi@raspberrypi ~ $ gdb python
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...BFD: /usr/bin/python: invalid string offset 4204450 >= 26547 for section `.dynstr'
BFD: /usr/bin/python: invalid string offset 34425 >= 26547 for section `.dynstr'
BFD: /usr/bin/python: invalid string offset 276647 >= 26547 for section `.dynstr'
...
(50 or so such lines later)
...
BFD: /usr/bin/python: invalid string offset 2340624285 >= 26547 for section `.dynstr'
(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python
Program received signal SIGSEGV, Segmentation fault.
0xb6ff0124 in ?? () from /lib/ld-linux-armhf.so.3
(gdb) backtrace
#0 0xb6ff0124 in ?? () from /lib/ld-linux-armhf.so.3
#1 0xbefff358 in ?? ()
Cannot access memory at address 0x7a626964
I found this related post, but no clear solution is given.
Last element: python3 works just fine.
Would anyone here have an idea of what is happening?
Thanks for your help ~