When I use gdb to debug my C++ program with segmentation fault, I come with this error in gdb.
Traceback (most recent call last):
If you used sudo to start the gdb, make sure you have the PATH correct.
sudo
Try this sudo PATH=$PATH gdb ...
sudo PATH=$PATH gdb ...