Installing Dependency Packages
- Configure the source based on the network environment to install the dependency packages required for compiling the source code.
- After the configuration is complete, update the index.
1# sudo apt update - Install the dependency packages required for the compilation.
If the following information is displayed, click Cancel.

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
# sudo apt-get install libgl1-mesa-dev g++-multilib # sudo apt-get install git flex bison gperf build-essential # sudo apt-get install tofrodos python3-markdown xsltproc # sudo apt-get install dpkg-dev libsdl1.2-dev # sudo apt-get install git-core gnupg # sudo apt-get install zip curl zlib1g-dev gcc-multilib # sudo apt-get install libc6-dev-i386 libx11-dev libncurses5-dev # sudo apt-get install lib32ncurses5-dev x11proto-core-dev # sudo apt-get install libxml2-utils unzip m4 # sudo apt-get install lib32z-dev ccache # sudo apt-get install libssl-dev gettext # sudo apt-get install python3-mako # sudo apt-get install libncurses5 # sudo apt-get install python3-chardet python3-markupsafe # sudo apt-get install python3-packaging python3-pkg-resources python3-pygments # sudo apt-get install python3-pyparsing python3-six python3-yaml python2 python2.7 # sudo apt-get install python3 python3-apport python3-apt python3-attr python3-automat # sudo apt-get install python3-blinker python3-certifi python3-cffi-backend python3-chardet # sudo apt-get install python3-click python3-colorama python3-commandnotfound # sudo apt-get install python3-configobj python3-constantly # sudo apt-get install python3-cryptography python3-dbus python3-debconf # sudo apt-get install python3-debian python3-dev python3-distro python3-distro-info # sudo apt-get install python3-distupgrade python3-distutils python3-entrypoints # sudo apt-get install python3-gdbm python3-gi python3-hamcrest python3-httplib2 # sudo apt-get install python3-hyperlink python3-idna python3-importlib-metadata # sudo apt-get install python3-incremental python3-jinja2 python3-json-pointer # sudo apt-get install python3-jsonpatch python3-jsonschema python3-jwt # sudo apt-get install python3-keyring python3-launchpadlib python3-lazr.restfulclient # sudo apt-get install python3-lazr.uri python3-lib2to3 python3-markupsafe # sudo apt-get install python3-more-itertools python3-nacl python3-netifaces python3-newt # sudo apt-get install python3-oauthlib python3-openssl python3-pip python3-pkg-resources # sudo apt-get install python3-problem-report python3-pyasn1 # sudo apt-get install python3-pyasn1-modules python3-pymacaroons python3-pyrsistent # sudo apt-get install python3-requests python3-requests-unixsocket python3-secretstorage # sudo apt-get install python3-serial python3-service-identity # sudo apt-get install python3-setuptools python3-simplejson python3-six # sudo apt-get install python3-software-properties python3-systemd python3-twisted # sudo apt-get install python3-update-manager python3-urllib3 python3-wadllib # sudo apt-get install python3-wheel python3-yaml python3-zipp python3-zope.interface # sudo apt-get install python-is-python3 # sudo apt-get install ninja-build # sudo apt-get install autoconf
- Check whether the Python 3 environment of the server contains the mako module. If it does not have the mako module, install the module.
Run the following command to go to the Python 3 environment:
1# python3
In the Python 3 environment, run the following command to view the module information:1>>> help("modules")

As shown in the following figure, if the command output contains the mako module, you can proceed with subsequent operations. If the mako module is missing, install it in the Python 3 environment. You can download the mako source code or use pip to install the mako module. The mako module is necessary for subsequent operations.

- Create a buildtools directory in the user directory.
1 2
# mkdir ~/buildtools # chmod -R 700 ~/buildtools
- Install Meson 0.63.2.Download the source package based on Software Environment, upload the meson-0.63.2.tar.gz package in the source package to the ~/buildtools directory, and decompress meson-0.63.2.tar.gz.
1 2
# cd ~/buildtools # tar -xvpf meson-0.63.2.tar.gz
- Set environment variables.
- Add the following content to the end of ~/.bashrc:
# cat >> ~/.bashrc <<EOF export PATH=~/buildtools/meson-0.63.2:\$PATH EOF
- Run the following command for the environment variables to take effect.
# source ~/.bashrc
- Add the following content to the end of ~/.bashrc:
Parent topic: Software Compilation