---
title: 安装编译依赖包
description: "1. 根据实际网络环境配置源，以便安装编译源码需要的依赖包。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/230RC2/armnative/kunpengcpskbox_20_0015.html
sourcePath: /source/zh/kunpengboostkithistory/230RC2/armnative/kunpengcpskbox_20_0015.html
indexId: ddf326abf55e9e9f508bb1af9d3b7699e8ecee9b061ba3c4de971642deac450378
---
# 安装编译依赖包

1. 根据实际网络环境配置源，以便安装编译源码需要的依赖包。
2. 配置完成后，更新索引。
  1 # sudo apt update

3. 安装编译环境所需依赖包。
  如遇如图提示信息，选择“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

4. 确认服务器的python3环境是否包含mako模块。若无，请为服务器的python3环境安装mako模块。
  执行命令，进入python3环境：

  1 # python3

  进入python3环境后，执行命令，查看包含的模块信息。 1 >>> help("modules")

  如图所示，若回显中包含mako模块，则可继续后文步骤。若不包含，则需安装mako模块到python3环境中。安装时可下载mako源码进行安装，也可通过pip等方式安装，请确保python3环境中包含mako模块，再继续后文的步骤。

5. 在用户目录下创建“buildtools”目录。
  1 2 # mkdir ~/buildtools # chmod -R 700 ~/buildtools

6. 安装meson 0.63.2。
  参考软件环境中的链接下载源码包后，将源码包中的“meson-0.63.2.tar.gz”文件上传至“~/buildtools”目录并解压。 1 2 # cd ~/buildtools # tar -xvpf meson-0.63.2.tar.gz

7. 设置环境变量。

  a. 在“~/.bashrc”末尾添加如下内容。

```
# cat >>
~
/.bashrc <<EOF
export PATH=
~
/buildtools/meson-0.63.2:\$PATH
EOF
```


  b. 使用如下命令，使环境变量生效。

```
# source
~
/.bashrc
```
