You are not logged in.
Pages: 1
Hello everyone,
Whenever i am installing any s/w from source by compiling,its executable is getting stored in /usr/local/bin.Now im unable to use the s/w by just typing its executable name in the terminal,its giving me an error as "command not found".what i have to do is browse to the directory /usr/local/bin n then run the executable as ./xxxxx.How can i add the directory /usr/local/bin so that it too is checked for executables.
Thanks in advance,
Rajiv Nair.
Offline
To compile programs to the "default" or better said prefereed prefix, you should compile it with the corresponding prefix so it looks like
configure --prefix=/usr
To get /usr/local/bin also in your PATH look into /etc/profile. There u'll find on top iirc some paths declared, just put yours there too.
cheers,
detto
Offline
The Arch Way(tm) of installing s/w on your system is to write a PKGBUILD. This may take a little more time but you gain some advantages:
- You can install and remove the built packages using pacman.
(You avoid unneeded files resting on your HD)
- You can install the created package on other Arch Systems without the need to rebuild it
- You can build your package in a secure way (using fakroot)
- You can easily share your created packages in the AUR.
Haven't been here in a while. Still rocking Arch.
Offline
Sure, this method mentioned bi Sigi is the better way of installing something from source.
My suggest to you now too, try with a PKGBUILD (it really is damn easy ) and if that fails write back here.
cheers,
deTTo
Offline
Sure, this method mentioned bi Sigi is the better way of installing something from source.
Thanks a lot! I just wanted to clarify that this:
configure --prefix=/usr
is also needed in the PKGBUILD if you are going to compile it that way. So detto's statement was absolutely correct!
Haven't been here in a while. Still rocking Arch.
Offline
The reason /usr/local/bin/ was not in the $PATH is because arch doesn't support it. Instead compile programs to use /usr/bin.
Offline
thnx a lot detto,it worked
i know all about makepkg n PKGBUILD but dint know about the /etc/profile thing
Offline
i tried searching on the wiki, but can someone explain why arch does not install anything into /usr/local ?
Offline
i tried searching on the wiki, but can someone explain why arch does not install anything into /usr/local ?
Its something along the lines of "its not necessary, there's no reason it can be run from /usr/bin....[...]...not simple enough....[...]...bla bla"
Offline
Anyway, /usr/local is made just for those things you do not want to be touched by your package manager. So, if for any reason you do not want to write a PKGBUILD for something (if e.g., it is just a little script you wrote and you want to install it system-wide; or you have some reasons to make the compilation routine step by step), then /usr/local is then just the right place: /usr/local/bin and /usr/local/sbin for executable with various permissions, /usr/local/lib for the libraries, may be /usr/local/src for the sources, etc. Then you should just modify your /etc/profile (or your .bashrc, .zshrc).
This is not what is supported by arch, but it is something you can always do, if you like so, in any linux system of the world.
Mortuus in anima, curam gero cutis
Offline
Pages: 1