Skip to main content

During startup program exited with code 127 - GDB TOOL [FIXED]


 Cannot exec During startup program exited with code 127 - GDB TOOL [FIXED]

root@kali:~/Desktop# gdb main
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...done.
(gdb) r
Starting program: /root/Desktop/main
Cannot exec rsd -c exec /root/Desktop/main .
Error: No such file or directory
During startup program exited with code 127
.
(gdb) q


fix --

use this command to check your prob


:~$ env | grep SHELL

it should print out this command
ant2ne@lenobuntu:~$ env | grep SHELL
SHELL=/bin/sh
 if it print some thing else than use this command for temporary purpose 
export SHELL=/bin/sh
 
 
demo- 
root@kali:~/Downloads# env | grep SHELL
SHELL=rsd
root@kali:~/Downloads# export SHELL=/bin/sh
root@kali:~/Downloads# env | grep SHELL
SHELL=/bin/sh
root@kali:~/Downloads#