Ubuntu - debug in CLION exits with code 127
I am running CLion 2017.1.3 on Ubuntu 16.04 LTS. When I click the Debug button, the C ++ project builds and then the debugger stops and exits with an error:
"At startup, the program exited with code 127.
Process ended with exit code 0 "
I searched for this problem on StackOverflow and other forums, but could not find an answer to solve my problem. Please help me to solve this error.
source to share
The problem was that my SHELL variable was pointing to the wrong path. I found out about this when I ran into another issue where I could not install any python packages using pip. When I was looking for this error, I happened to find out this problem with the SHELL variable.
Execute echo $SHELL
in terminal and check if it is a valid shell that you are using. I am using bash shell and hence change it to /bin/bash
using the commandchsh -s /bin/bash root
Also, some debug libraries were missing and I was able to restore them using the Ubuntu Software Updater. Now I can debug :)
source to share