Failure running program in a directory on my PATH variable
I am quite confused about running a program (molden) that is on my PATH variable. Typing its name does work on my VAIO laptop while it does not work on my GPU gig64 workstation. With the latter I have to dig into the directory where the program is, and type ./program_name (thereafter it works correctly also with the workstation, actually better owing to the GPUs). Curiously,
which molden gives the correct answer only with VAIO, although in both cases $PATH has the same output francesco@vaio64:~$ $PATH bash: /opt/molden:.......... francesco@gig64:~$ SPATH bash: /opt/molden:..... resulting from the same setting of .bashrc with VAIO and gig64 # For molden export PATH="/opt/molden:$PATH" LD_PRELOAD=/opt/molden/libgfortran.so.3 /bin/ls export LD_PRELOAD=/opt/molden/libgfortran.so.3 (the LD_PRELOAD because my Debian is at so.4 while the compilation was at so.3) Thanks for advice chiendarret |
In your second instance you show "SPATH" rather than "$PATH". Is that a typo?
To see the contents of variables you should type "echo $<VAR>" rather than just "$<VAR>". e.g. echo $PATH Otherwise you risk executing something unintended. When you type "which molden" what exactly is the output you see on the one where it fails? Is it possible it finds another "molden" elsewhere in your PATH? |
Yes, a typo.
GIG64 where it does not work francesco@gig64:~$ echo $PATH opt/molden:/opt/NAMD_2.12_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:opt/molden:/opt/NAMD_2.12_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/UCSF/Chimera64-1.11.2/bin:/opt/VMD:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/NAMD_2.12_Linux-x86_64-multicore/namd2:/opt/UCSF/Chimera64-1.11.2/bin:/opt/VMD:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/NAMD_2.12_Linux-x86_64-multicore/namd2 francesco@gig64:~$ which molden francesco@gig64:~$ which gmolden francesco@gig64:~$ i.e., nothing from "which" VAIO where it works (if anything, it is unclear why the PATH variable is reated for molden, while there is a single instance of that and only .bashrc was used, no .profile ; the same issue for "mopac") francesco@vaio64:~$ echo $PATH /opt/molden:/opt/mopac:/usr/local/lib/plugins/LINUXAMD64/bin/catdcd5.2:/opt/NAMD_Git-2018-11-27_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:/opt/molden:/opt/mopac:/usr/local/lib/plugins/LINUXAMD64/bin/catdcd5.2:/opt/NAMD_Git-2018-11-27_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:/opt/molden:/opt/mopac:/usr/local/lib/plugins/LINUXAMD64/bin/catdcd5.2:/opt/NAMD_Git-2018-11-27_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:/opt/molden:/home/francesco/softw/MSMS:/opt/mopac:/usr/local/lib/plugins/LINUXAMD64/bin/catdcd5.2:/opt/NAMD_Git-2018-11-27_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:/opt/molden:/home/francesco/softw/MSMS:/opt/mopac:/usr/local/lib/plugins/LINUXAMD64/bin/catdcd5.2:/opt/NAMD_Git-2018-11-27_Linux-x86_64-multicore:/opt/anaconda2/bin:/opt/MGLTools-1.5.6/bin:/opt/vina_1_1_2_linux_x86/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:usr/local/sbin:/opt/UCSF/Chimera64-1.13.1rc/bin:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/namd_Git-2018-11-27_Linux-x86_64-multicore/namd2:/opt/UCSF/Chimera64-1.13.1rc/bin:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/namd_Git-2018-11-27_Linux-x86_64-multicore/namd2:/opt/UCSF/Chimera64-1.13.1rc/bin:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/namd_Git-2018-11-27_Linux-x86_64-multicore/namd2:/opt/UCSF/Chimera64-1.13.1rc/bin:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/namd_Git-2018-11-27_Linux-x86_64-multicore/namd2:/opt/UCSF/Chimera64-1.13.1rc/bin:/opt/vina_1_1_2_linux_x86/bin/vina:/opt/namd_Git-2018-11-27_Linux-x86_64-multicore/namd2 francesco@vaio64:~$ francesco@vaio64:~$ which molden /opt/molden/molden francesco@vaio64:~$ which gmolden /opt/molden/gmolden francesco@vaio64:~$ |
Please use [code] tags when posting output, for readability.
The which command only searches directories within PATH, so having no output means that the command molden is not located in a PATH directory, i.e., it's not in /opt/molden As root, try Code:
find / -name molden -ls Or. You say (imply) you can cd to /opt/molden then execute it by entering ./molden -- did I understand that correctly? If that's the case, please Code:
ls -l /opt/modlen |
Code:
francesco@gig64:~$ echo $PATH Must be Code:
francesco@gig64:~$ echo $PATH |
Quote:
|
Yes, the error came from .bashrc, lacking /. Thanks a lot
|
All times are GMT -5. The time now is 02:25 PM. |