1. On ubuntu, when you compile and install new python, your gdb will fail due to new version python
2. for solving the problem, you must let gdb use new python or use old python.
3. Here is a way of using old python
export PYTHONPATH=/usr/lib/python2.7:/usr/local/lib/python3.4
其中, /usr/lib/python2.7 是系统python库位置。