文档
注册
评分
提单
论坛
小智

安装编译依赖包

进行编译前,需要为环境配置源,安装python3的mako模块以及Meson等依赖包。

  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
    sudo apt-get install libgl1-mesa-dev g++-multilib git flex bison gperf build-essential
    sudo apt-get install tofrodos python3-markdown xsltproc dpkg-dev libsdl1.2-dev
    sudo apt-get install git-core gnupg zip curl zlib1g-dev gcc-multilib
    sudo apt-get install libc6-dev-i386 libx11-dev libncurses5-dev lib32ncurses5-dev x11proto-core-dev
    sudo apt-get install libxml2-utils unzip m4 lib32z-dev ccache libssl-dev gettext python3-mako libncurses5
    sudo apt-get install python3-chardet python3-markupsafe 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 
    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
    sudo apt-get install python3-more-itertools python3-nacl python3-netifaces python3-newt 
    sudo apt-get install python3-oauthlib python3-openssl python3-pip 
    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
    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-zipp python3-zope.interface
    sudo apt-get install python-is-python3 ninja-build 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。
    请参见软件环境中的链接下载源码包后,将源码包中的“meson-0.63.2.tar.gz”文件上传至“~/buildtools”目录并解压。
    1
    2
    cd ~/buildtools
    tar -xvpf meson-0.63.2.tar.gz
    
  7. 设置环境变量。
    1. “~/.bashrc”文件末尾添加如下内容。
      1
      2
      3
      cat >> ~/.bashrc <<EOF
      export PATH=~/buildtools/meson-0.63.2:\$PATH
      EOF
      
    2. 使环境变量生效。
      1
      source ~/.bashrc
      
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词