Hands-On Game Development with WebAssembly
上QQ阅读APP看书,第一时间看更新

Installing Emscripten on Ubuntu

If you are installing on Ubuntu, you should be able to use the apt-get package manager and git for the complete install. Let's move forward:

  1. Python is required, so if you do not have Python installed, be sure to run the following:
sudo apt-get install python
  1. If you do not already have Git installed, run the following:
sudo apt-get install git
  1. Now you will need to clone the Git repository for emsdk:
git clone https://github.com/emscripten-core/emsdk.git
  1. Change your directory to move into the emsdk directory:
cd emsdk
  1. From here, you need to install the latest version of the SDK tools, activate it, and set your environment variables:
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
  1. To make sure everything was installed correctly, run the following command:
emcc --version