User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/using_xstow_for_local_installations.meta failed
tutorials:using_xstow_for_local_installations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:using_xstow_for_local_installations [2016/02/26 17:52] – ↷ Page moved from using_xstow_for_local_installations to tutorials:using_xstow_for_local_installations amoratutorials:using_xstow_for_local_installations [2022/09/20 00:08] (current) – external edit 127.0.0.1
Line 3: Line 3:
   * Install xstow   * Install xstow
  
 +<code bash>
   sudo apt-get install xstow   sudo apt-get install xstow
 +</code> 
 +  * We need to modify some environmental variables (in your .bashrc file): 
 +<code bash> 
 +export PYTHON_VERSION=$(basename $(readlink -e $(which python))) 
 +export PYTHON3_VERSION=$(basename $(readlink -e $(which python3))) 
 +export PATH=${HOME}/local/bin:${HOME}/local/sbin:${HOME}/local/usr/bin:${PATH} 
 +export LD_LIBRARY_PATH=${HOME}/local/lib:${HOME}/local/usr/lib:${LD_LIBRARY_PATH} 
 +export LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBRARY_PATH} 
 +export CPATH=${HOME}/local/include:${HOME}/local/usr/include:${CPATH} 
 +export LDFLAGS="-L${HOME}/local/lib ${LDFLAGS}" 
 +export PKG_CONFIG_PATH=${HOME}/local/lib/pkgconfig 
 +export CMAKE_INCLUDE_PATH=${CPATH} 
 +export CMAKE_LIBRARY_PATH=${LIBRARY_PATH} 
 +export PYTHONPATH=${HOME}/local/lib/python/site-packages:${HOME}/local/lib/python3/site-packages:${HOME}/local/lib/${PYTHON_VERSION}/site-packages:${HOME}/local/lib/${PYTHON_VERSION}/dist-packages:${HOME}/local/lib/${PYTHON3_VERSION}/site-packages:${HOME}/local/lib/${PYTHON3_VERSION}/dist-packages:${HOME}/local/lib/python/dist-packages:${HOME}/local/lib/python3/dist-packages:${PYTHONPATH} 
 +</code> 
 +  * Please add this exports to the .bashrc file in your home directory. Please logout and login from your graphical session after modifying the .bashrc file. This is necessary in order to have the changes available in any new opened console.
   * Make the basic directory structure   * Make the basic directory structure
 +<code bash>
   mkdir -p local/src   mkdir -p local/src
   mkdir -p local/DIR   mkdir -p local/DIR
 +</code>  
 +==== Example ====
 +
 +The following is an example of how to use ''xstow''. This will fail if you try to follow it.
  
   * Download the source code to local/src and then compile it setting the installation directory to DIR/name-of-project:   * Download the source code to local/src and then compile it setting the installation directory to DIR/name-of-project:
Line 26: Line 46:
  
   * The last step creates symbolic links one directory up, in effect enabling the program   * The last step creates symbolic links one directory up, in effect enabling the program
-  * All this is useless if we don't modify some environmental variables: + 
- +
-  export PYTHON_VERSION=$(readlink $(which python)) +
-  export PATH=${HOME}/local/bin:${HOME}/local/sbin:${HOME}/local/usr/bin:${PATH} +
-  export LD_LIBRARY_PATH=${HOME}/local/lib:${HOME}/local/usr/lib:${LD_LIBRARY_PATH} +
-  export LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBRARY_PATH} +
-  export CPATH=${HOME}/local/include:${HOME}/local/usr/include:${CPATH} +
-  export LDFLAGS="-L${HOME}/local/lib ${LDFLAGS}" +
-  export PKG_CONFIG_PATH=${HOME}/local/lib/pkgconfig +
-  export CMAKE_INCLUDE_PATH=${CPATH} +
-  export CMAKE_LIBRARY_PATH=${LIBRARY_PATH} +
-  export PYTHONPATH=${HOME}/local/lib/python/site-packages:${HOME}/local/lib/${PYTHON_VERSION}/site-packages:${HOME}/local/lib/${PYTHON_VERSION}/dist-packages:${HOME}/local/lib/python/dist-packages:${PYTHONPATH} +
- +
-  * Please add this exports to the .bashrc file in your home directory. Please logout and login from your graphical session after modifying the .bashrc file. This is necessary in order to have the changes available in any new opened console.+
   * Now the example project is as useful as if it would be installed in the system directories.   * Now the example project is as useful as if it would be installed in the system directories.
   * To disable example:   * To disable example:
Line 45: Line 52:
   cd ~/local/DIR   cd ~/local/DIR
   xstow -D example   xstow -D example
- 
-~~DISCUSSION~~ 
tutorials/using_xstow_for_local_installations.1456509162.txt.gz · Last modified: 2022/09/20 00:08 (external edit)