1e41f4b71Sopenharmony_ci# Installing Libraries and Tools 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ciBefore using the CLI for device development, perform the following steps to install the required libraries and tools. 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciOn Ubuntu: 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci1. Run the following **apt-get** command: 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci ``` 13e41f4b71Sopenharmony_ci 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 libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev 14e41f4b71Sopenharmony_ci ``` 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci > **NOTE** 17e41f4b71Sopenharmony_ci > 18e41f4b71Sopenharmony_ci > - The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, modify the preceding installation command based on the installation package name. 19e41f4b71Sopenharmony_ci > 20e41f4b71Sopenharmony_ci > - Python 3.8 or a later version is required. This section uses Python 3.8 as an example. 21e41f4b71Sopenharmony_ci > 22e41f4b71Sopenharmony_ci > - Java 8 or later is required. This section uses Java 8 as an example. 23e41f4b71Sopenharmony_ci > 24e41f4b71Sopenharmony_ci > - If you are using Ubuntu 20 or later, do not install gcc-arm-linux-gnueabi, because gcc-multilib and gcc-arm-linux-gnueabi are mutually exclusive. 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci2. Set Python 3.8 as the default Python version. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci Check the location of Python 3.8. 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci ``` 32e41f4b71Sopenharmony_ci which python3.8 33e41f4b71Sopenharmony_ci ``` 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci Switch Python and Python3 to Python 3.8. 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ci ``` 38e41f4b71Sopenharmony_ci sudo update-alternatives --install /usr/bin/python python {Python 3.8 path} 1 #{Python 3.8 path} is the location of Python 3.8 obtained in the previous step. 39e41f4b71Sopenharmony_ci sudo update-alternatives --install /usr/bin/python3 python3 {Python 3.8 path} 1 #{Python 3.8 path} is the location of Python 3.8 obtained in the previous step. 40e41f4b71Sopenharmony_ci ``` 41