Installing software in your home directory: Difference between revisions

Jump to navigation Jump to search
→‎configure; make; make install: clarify sudo, replace HOME with PROJECT
(partial first draft)
 
(→‎configure; make; make install: clarify sudo, replace HOME with PROJECT)
Line 15: Line 15:
is a very common instruction pattern. Variations include <code>cmake .</code> replacing <code>./configure</code>, and <code>sudo make install</code> replacing <code>make install</code>.
is a very common instruction pattern. Variations include <code>cmake .</code> replacing <code>./configure</code>, and <code>sudo make install</code> replacing <code>make install</code>.


Sometimes this will work exactly as prescribed, but sometimes it will fail at <code>make install</code> or <code>sudo make install</code> because the package expects to be able to write to <code>/usr/local</code> or some other shared area in the file system. The usual solution is to supply a <code>--prefix</code> flag at the <code>configure</code> step, to direct the installation to go to the directory of your choice, ''e.g.:''
Sometimes this will work exactly as prescribed, but sometimes it will fail at <code>make install</code> because the package expects to be able to write to <code>/usr/local</code> or some other shared area in the file system. It will always fail if <code>sudo make install</code> is attempted, because <code>sudo</code> is a request for "root" or administrator privileges. The usual solution is to supply a <code>--prefix</code> flag at the <code>configure</code> step, to direct the installation to go to the directory of your choice, ''e.g.:''
{{Command|./configure --prefix{{=}}$HOME/some-package && make && make install}}
{{Command|./configure --prefix{{=}}$PROJECT/some-package && make && make install}}


If other errors arise, contact [mailto:support@computecanada.ca support]. For more information see [[Make]], [[Autotools]], and [[CMake]].
If other errors arise, contact [mailto:support@computecanada.ca support]. For more information see [[Make]], [[Autotools]], and [[CMake]].
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu