Android source code compilation environment download Daquan

There are too many environments to install for Android source code compilation, some will report errors during the compilation process, and you have to search for error messages to find solutions. It may be solved by adding a library. It will take a long time. The lack of encounters under this record library.

#编译android 安装环境

sudo apt-get update
sudo apt-get install openjdk-8-jdk
apt install curl

#python2用于android,python3用于鸿蒙
sudo apt-get install python2
#sudo apt-get install python3

sudo apt-get install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib 
sudo apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386 
sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 
sudo apt-get install dpkg-dev libsdl1.2-dev libesd0-dev
sudo apt-get install git-core gnupg flex bison gperf build-essential  
sudo apt-get install zip curl zlib1g-dev gcc-multilib g++-multilib 
sudo apt-get install libc6-dev-i386 
sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev 
sudo apt-get install libgl1-mesa-dev libxml2-utils xsltproc unzip m4
sudo apt-get install lib32z-dev ccache

sudo apt-get install git

#安装git-lfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install


sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install ruby

sudo apt-get install libncurses5
sudo apt-get install libssl-dev
sudo apt-get install libswitch-perl

sudo apt install python-pip
sudo pip install pycryptodome


#openharmony
sudo apt-get update && sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib gcc-arm-linux-gnueabi libc6-dev-i386 libc6-dev-amd64 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales
sudo apt install genext2fs

Compilation error -build stopped: subcommand failed. The solution is generally because the number of open files in the server process is limited

Generally, it is due to the limit on the number of open files of the server process

1.vim /etc/security/limits.conf add the following line

# 解除服务器所有用户文件数 进程限制
*             soft       nofile      10240
*             hard       nofile      10240
*             soft       noproc      10240
*             hard       noproc      10240


2. After saving, enter ulimit -n 10240 and press Enter to take effect.

3. Prompt ulimit command execution:

sudo sh -c "ulimit -n 65535 && exec su $LOGNAME"


Then go to the second step,

4. Use ulimit -a to check and see!


Compilation error - ImportError: No module named Crypto.Signature
https://blog.csdn.net/u012121105/article/details/118606168

Guess you like

Origin blog.csdn.net/gxhea/article/details/125811668