# Jason Gao
# imsaws@126.com
# Now in Xidian University
sudo apt-get install subversion git-core git-svn
sudo apt-get install make gcc g++ libX11-dev libXt-dev libgl1-mesa-dev libosmesa6-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev
sudo apt-get install cmake
(ln -s 最好手动,最后要确认一下,为了区分最好命名为cmake-ssl)
sudo apt-get install openssl libssl-dev
mkdir ~/Support && cd Support
cmake_package="cmake-3.0.0"; wget http://www.cmake.org/files/v3.0/$cmake_package.tar.gz -v -O $cmake_package.tar.gz && tar -xzvf $cmake_package.tar.gz; cd $cmake_package && cmake -DCMAKE_USE_OPENSSL:BOOL=ON && make -j4
for tool in cmake ccmake ctest cpack; do sudo ln -s ~/Support/$cmake_package/bin/$tool /usr/local/bin/$tool; done
(不用openssl可以省略中间步骤,configure时记得删除openssl参数)
cd ~/Support
cwd=$(pwd)
rm -f get-and-build-openssl-for-slicer.sh
wget https://gist.githubusercontent.com/jcfr/9513568/raw/21f4e4cabca5ad03435ecc17ab546dab5e2c1a2f/get-and-build-openssl-for-slicer.sh
chmod u+x get-and-build-openssl-for-slicer.sh
./get-and-build-openssl-for-slicer.sh
wget http://packages.kitware.com/download/item/6175/qt-everywhere-opensource-src-4.8.6.tar.gz
md5=`md5sum ./qt-everywhere-opensource-src-4.8.6.tar.gz | awk ‘{ print $1 }‘` &&
[ $md5 == "2edbe4d6c2eff33ef91732602f3518eb" ] || echo "MD5 mismatch. Problem downloading Qt"
tar -xzvf qt-everywhere-opensource-src-4.8.6.tar.gz
mv qt-everywhere-opensource-src-4.8.6 qt-everywhere-opensource-release-src-4.8.6
mkdir qt-everywhere-opensource-release-build-4.8.6
cd qt-everywhere-opensource-release-src-4.8.6
./configure -prefix $cwd/qt-everywhere-opensource-release-build-4.8.6/ -release -opensource -confirm-license -no-qt3support -webkit -nomake examples -nomake demos -openssl -I $cwd/openssl-1.0.1e/include -L $cwd/openssl-1.0.1e && make -j7 && make install
原文地址:http://blog.csdn.net/u014539401/article/details/43883417