1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
\section installation_linux Installation on Linux
\subsection install_debian Installation for Debian Linux (via repository)
A <a href="https://packages.debian.org/source/sid/pktools">binary package</a> of pktools for Debian is maintained by Francesco Paolo Lovergine and available in the repository. You can install it using the advanced package tool (apt):
\code
sudo apt-get install pktools
\endcode
The version in the repository might not be the latest available (please check the <a href="https://qa.debian.org/developer.php?login=pkg-grass-devel%40lists.alioth.debian.org">packages overview</a>). The latest version of pktools can always be installed via the \ref install_ubuntu "installation script" or from the source code using a \ref install_manual "manual" installation.
\subsection install_ubuntu Installation for Ubuntu (Debian based) Linux distributions (from source code via automatic script)
Users working with Debian based distributions (e.g., Ubuntu) can download <a href="http://download.savannah.gnu.org/releases/pktools/install_pktools.sh">install_pktools.sh</a>. This script will automatically download the latest release of pktools and dependencies. You need an internet connection when running the script (as root or sudo):
\code
sudo bash install_pktools.sh
\endcode
\subsection install_manual Manual installation for (all Linux distributions)
For a manual installation, download the <a href="http://download.savannah.gnu.org/releases/pktools/pktools-latest.tar.gz">latest</a> release from <a href="http://download.savannah.gnu.org/releases/pktools/">Savannah</a>
Optionally: check the release <a href="http://download.savannah.gnu.org/releases/pktools/pktools-latest.md5">md5sum</a> to ensure originality.
\code
md5sum pktools-latest.tar.gz
\endcode
The result should be identical to the content of the corresponding md5 file you downloaded.
Unpack the tar zip file
\code
tar xzvf pktools-latest.tar.gz
cd pktools-*
\endcode
You can install pktools via
- \ref installation_cmake "cmake" (linux, windows, Mac OS)
Notice that "autotools" (configure, make, make install) is deprecated from version 2.6.7, please use cmake instead
\subsubsection pktools_installation_required Required dependences
packages to install before pktools
- g++
- make
- libgdal-dev (see also http://trac.osgeo.org/gdal/wiki/BuildingOnUnix)
- libgsl0-dev (see also http://www.gnu.org/software/gsl/)
- libarmadillo-dev (see also http://arma.sourceforge.net/download.html)
Example on how to install required packages in Debian based system (using apt-get):
- sudo apt-get install g++ make libgdal-dev libgsl0-dev libarmadillo-dev
\subsubsection pktools_installation_optional Optional dependences
<b>To enable program \ref pkoptsvm</b>
Install additional package
- libnlopt-dev (see also http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation )
Example on how to install required packages in Debian based system (using apt-get):
\code
sudo apt-get install libnlopt-dev
\endcode
Note: currently, the repository seems not to include this package anymore and manual installation is required (see also http://ab-initio.mit.edu/wiki/index.php/NLopt#Download_and_installation)
- Install pktools with with extra configuration option --enable-nlopt:
\code
./configure --enable-nlopt
make
sudo make install
sudo ldconfig
\endcode
<b>To enable programs \ref pkann and \ref pkfsann</b>
Install package
- libfann-dev (see also http://leenissen.dk/fann/wp/download/)
Example on how to install required packages in Debian based system (using apt-get):
\code
sudo apt-get install libfann-dev
\endcode
Install pktools with extra cmake option -DBUILD_WITH_FANN=ON
\code
mkdir build
cd build
cmake -DBUILD_WITH_FANN=ON ..
make
sudo make install
\endcode
<b>To enable program \ref pklas2img</b>
Install additional packages:
- libboost-dev (see also http://www.boost.org/)
- liblas1 (from Mateusz Loskot, see also http://www.liblas.org/tutorial/cpp.html)
- liblas-dev
- python-liblas
- liblas2
- liblas-c2
- liblas-c-dev
Example on how to install required packages in Debian based system (using apt-get):
- first add the following two lines to /etc/apt/sources.list (replace <codename> with what you get from lsb_release -c)
\code
deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main
\endcode
- then install extra packages:
\code
sudo apt-get install libboost-dev liblas-dev liblas-c-dev liblas1 liblas2 liblas-c2 python-liblas
\endcode
Or install manually as explained in http://www.liblas.org/compilation.html#using-unix-makefiles-on-linux
! Note that if you want support for compressed las format (LAZ), you need to install laszip first (http://www.laszip.org) and install liblas manually
- Install pktools with with extra cmake option -DBUILD_WITH_LIBLAS=ON
\code
mkdir build
cd build
cmake -DBUILD_WITH_LIBLAS=ON ..
make
sudo make install
\endcode
\code
\subsection Troubleshooting cmake in Linux (installed version is not 2.8)
If your system does not have CMake version 2.8, or your repository has an older version, you can manually install the latest version of CMake (for instance version 3.2.2):
\code
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
tar xf cmake-3.2.2.tar.gz
cd cmake-3.2.2
./configure
make
make install
\endcode
In order to have ccmake look for the newly installed version in /usr/local/bin, I had to (on a Debian/Ubuntu based system):
\code
sudo apt-get install libncurses5-dev
\code
Then reconfigure/compile/install cmake and restart the shell
|