Created
February 8, 2022 05:12
-
-
Save ajinkya/25ad2aa91f596e03a2ba8323179f16e1 to your computer and use it in GitHub Desktop.
Build osmiumtool libosmium and protozero from source in WSL2 (Ubuntu) on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo -e "Please run as root, by prefixing the commmand with sudo ./<\033[3mscript-name\033[0m>.sh" | |
exit | |
fi | |
apt-get update # To get the latest package lists | |
apt-get purge --auto-remove -q -y libosmium2-dev | |
apt-get purge --auto-remove -q -y libprotozero-dev | |
apt-get install -q -y cmake doxygen g++ git graphviz libboost-dev libbz2-dev libexpat1-dev libgdal-dev libgeos++-dev | |
apt-get install -q -y liblz4-dev libproj-dev make ruby ruby-json spatialite-bin zlib1g-dev rapidjson-dev | |
apt-get install -q -y libboost-program-options-dev libbz2-dev zlib1g-dev liblz4-dev libexpat1-dev pandoc | |
mkdir osmium-install-src | |
cd osmium-install-src | |
git clone https://github.com/mapbox/protozero | |
git clone https://github.com/osmcode/libosmium | |
git clone https://github.com/osmcode/osmium-tool | |
mkdir protozero/build | |
cd protozero/build | |
cmake .. && make -j4 && make install | |
cd ../.. | |
mkdir libosmium/build | |
cd $_ | |
cmake .. && make -j4 && make install | |
cd ../.. | |
mkdir osmium-tool/build | |
cd osmium-tool/build | |
cmake .. && make -j4 && make install | |
cd ../../.. | |
echo "All Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment