Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Which shell you're running, and what is path of execution set for gps in it's script?
Also is there any link between /usr/gnat/bin/gps & /usr/gnat/bin/gps_exe executable files (check la -la /usr/gnat/bin/ once again)?
To me it sounds some pb with $PATH which is not updating. So once open a new terminal and test it again.
Terminal is running bash shell. the complete sequence is shown below along with the "la" suggestion. I have no clue whats going on, hope this gives you a clue. Thanks for looking Mike.
mike@mike-netbook-ubuntu:~$ PATH=/usr/gnat/bin:$PATH; export PATH
mike@mike-netbook-ubuntu:~$ echo $PATH
/usr/gnat/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
mike@mike-netbook-ubuntu:~$ gps
/usr/gnat/bin/gps: 61: exec: /usr/gnat/bin/gps_exe: not found
mike@mike-netbook-ubuntu:~$ gps_exe
bash: /usr/gnat/bin/gps_exe: No such file or directory
mike@mike-netbook-ubuntu:~$ echo $PATH
/usr/gnat/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
mike@mike-netbook-ubuntu:~$ ls /usr/gnat/bin/gps_exe
/usr/gnat/bin/gps_exe
mike@mike-netbook-ubuntu:~$ la -la /usr/gnat/bin
total 89836
drwxr-xr-x 2 mike mike 4096 Apr 19 2011 .
drwxr-xr-x 8 root root 4096 Oct 23 20:05 ..
-rwxr-xr-x 1 mike mike 562984 Apr 19 2011 addr2line
-rwxr-xr-x 3 mike mike 212740 Apr 19 2011 c++
-rwxr-xr-x 1 mike mike 561544 Apr 19 2011 c++filt
-rwxr-xr-x 1 mike mike 211108 Apr 19 2011 cpp
-rwxr-xr-x 1 mike mike 212740 Apr 19 2011 g++
-rwxr-xr-x 1 mike mike 209636 Apr 19 2011 gcc
-rwxr-xr-x 1 mike mike 16388 Apr 19 2011 gccbug
-rwxr-xr-x 1 mike mike 26432 Apr 19 2011 gcov
-rwxr-xr-x 1 mike mike 6077804 Apr 19 2011 gdb
-rwxr-xr-x 1 mike mike 188928 Apr 19 2011 gdbserver
-rwxr-xr-x 1 mike mike 1773408 Apr 19 2011 gnat
-rwxr-xr-x 1 mike mike 764692 Apr 19 2011 gnatbind
-rwxr-xr-x 1 mike mike 3022216 Apr 19 2011 gnatcheck
-rwxr-xr-x 1 mike mike 641632 Apr 19 2011 gnatchop
-rwxr-xr-x 1 mike mike 1670848 Apr 19 2011 gnatclean
-rwxr-xr-x 1 mike mike 2285128 Apr 19 2011 gnatelim
-rwxr-xr-x 1 mike mike 616032 Apr 19 2011 gnatfind
-rwxr-xr-x 1 mike mike 32143 Jul 29 2009 gnathtml.pl
-rwxr-xr-x 1 mike mike 117664 Apr 19 2011 gnatkr
-rwxr-xr-x 1 mike mike 409952 Apr 19 2011 gnatlink
-rwxr-xr-x 1 mike mike 1296288 Apr 19 2011 gnatls
-rwxr-xr-x 1 mike mike 1904272 Apr 19 2011 gnatmake
-rwxr-xr-x 1 mike mike 1007760 Apr 19 2011 gnatmem
-rwxr-xr-x 1 mike mike 2459656 Apr 19 2011 gnatmetric
-rwxr-xr-x 1 mike mike 1418912 Apr 19 2011 gnatname
-rwxr-xr-x 1 mike mike 2518152 Apr 19 2011 gnatpp
-rwxr-xr-x 1 mike mike 1177440 Apr 19 2011 gnatprep
-rwxr-xr-x 1 mike mike 2309608 Apr 19 2011 gnatstub
-rwxr-xr-x 1 mike mike 615904 Apr 19 2011 gnatxref
-rwxr-xr-x 1 mike mike 2765560 Apr 19 2011 gprbuild
-rwxr-xr-x 1 mike mike 8128065 Apr 19 2011 gprbuild_debug
-rwxr-xr-x 1 mike mike 2543608 Apr 19 2011 gprclean
-rwxr-xr-x 1 mike mike 7360543 Apr 19 2011 gprclean_debug
-rwxr-xr-x 1 mike mike 2366904 Apr 19 2011 gprconfig
-rwxr-xr-x 1 mike mike 6396679 Apr 19 2011 gprconfig_debug
-rwxr-xr-x 1 mike mike 621320 Apr 19 2011 gprof
-rwxr-xr-x 1 mike mike 1381 Jan 13 2011 gps
-rwxr-xr-x 1 mike mike 25557060 Jan 13 2011 gps_exe
-rwxr-xr-x 3 mike mike 212740 Apr 19 2011 i686-pc-linux-gnu-c++
-rwxr-xr-x 3 mike mike 212740 Apr 19 2011 i686-pc-linux-gnu-g++
-rwxr-xr-x 1 mike mike 209636 Apr 19 2011 i686-pc-linux-gnu-gcc
-rwxr-xr-x 1 mike mike 209636 Apr 19 2011 i686-pc-linux-gnu-gcc-4.5.3
-rwxr-xr-x 1 mike mike 996200 Apr 19 2011 objdump
mike@mike-netbook-ubuntu:~$
Two things here, first, after adding /usr/gnat/bin to PATH variable, once invoke:
% which gps
It will show you the full path of gps in output, i.e. /usr/gnat/bin. If it is, then everything is OK upto this step.
Second, could you once open the /usr/gnat/bin/gps file and share it's output (not all content, but few lines near line 61? To do this, do:
% cat /usr/gnat/bin/gps | nl
Actually, it now seems some variable declaration or script writing issue, which bash isn't able to handle. Also check what's gps script's execution path, I mean what mentioned in the first line in cat /usr/gnat/bin/gps file.. Is it #!/bin/bash or #!/bin/sh etc or something else?
if [ -d $root/lib/gps ]; then
unset GTK2_RC_FILES
fi
if [ -f $root/etc/fonts/fonts.conf ]; then
FONTCONFIG_FILE=$root/etc/fonts/fonts.conf
export FONTCONFIG_FILE
fi
if [ -f /etc/fonts/fonts.conf ]; then
if grep '<cachedir>' /etc/fonts/fonts.conf > /dev/null 2>&1; then
FONTCONFIG_FILE=/etc/fonts/fonts.conf
export FONTCONFIG_FILE
fi
fi
if [ -f $root/etc/pango/pangorc ]; then
PANGO_RC_FILE=$root/etc/pango/pangorc
export PANGO_RC_FILE
fi
if [ -f $root/etc/gtk-2.0/gdk-pixbuf.loaders ]; then
GDK_PIXBUF_MODULE_FILE=$root/etc/gtk-2.0/gdk-pixbuf.loaders
export GDK_PIXBUF_MODULE_FILE
fi
if [ "$CHARSET" = "" ]; then
CHARSET=ISO-8859-1
export CHARSET
fi
export LD_LIBRARY_PATH GTK_DATA_PREFIX GTK_EXE_PREFIX
if [ $debug = debug ]; then
gdb -args $root/bin/${prog}_exe "$@"
else
exec $root/bin/${prog}_exe "$@"
fi
Question will the shell indicate none-printing characters in some fashion??
Had an idea. I had created an "hello world" c program on my desk top 10.10 system.
I copied it into /usr/gnat/bin on the netbook 12.04 system and then tried to run it.
First I got a permissions error, which I fixed. Then when I tried to run it, I got the same file not found error.
I copied the project directory into my working directory and had the same thing happen as shown below.
One other thing I remembered which might somehow have something to do with this. Before loading this version of GANT/GPS, I accidently loaded and installed an older version that was a 32 bit version. I un-installed it but it might have left some sort of incompatibility around.
As if you can't tell, I am really thrashing around with this.
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS$ cd GPS_tutorial_project_etc
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ ls
auto.cgpr default.gpr hello libsimple_c.deps simple_C.d
b__simple_C.adb example hello.adb sample.gpr simple_c.gpr
b__simple_C.ads example.adb hello.ali simple_C simple_C.o
b__simple_C.ali example.ali hello.cswi simple_C.bexch
b__simple_C.o example.cswi hello.o simple_C.c
debug example.o libsimple_c.a simple_C.cswi
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ simple_C
bash: /usr/gnat/bin/simple_C: No such file or directory
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ ../GPS_tutorial_project_etc/simple_C
bash: ../GPS_tutorial_project_etc/simple_C: Permission denied
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ chmod a +x simple_C
chmod: invalid mode: `a'
Try `chmod --help' for more information.
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ chmod a+x simple_C
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ ../GPS_tutorial_project_etc/simple_C
bash: ../GPS_tutorial_project_etc/simple_C: No such file or directory
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.