1# Installing Libraries and Tools 2 3 4Before using the CLI for device development, perform the following steps to install the required libraries and tools. 5 6 7On Ubuntu: 8 9 101. Run the following **apt-get** command: 11 12 ``` 13 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 14 ``` 15 16 > **NOTE** 17 > 18 > - The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, modify the preceding installation command based on the installation package name. 19 > 20 > - Python 3.8 or a later version is required. This section uses Python 3.8 as an example. 21 > 22 > - Java 8 or later is required. This section uses Java 8 as an example. 23 > 24 > - 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. 25 262. Set Python 3.8 as the default Python version. 27 28 Check the location of Python 3.8. 29 30 31 ``` 32 which python3.8 33 ``` 34 35 Switch Python and Python3 to Python 3.8. 36 37 ``` 38 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. 39 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. 40 ``` 41