2021-04-10 Ubuntu系统查看版本及内核信息以及安装android编译环境
Ubuntu系统查看版本及内核信息以及安装android编译环境
一、查看ubuntu版本号以及内核信息
查看ubuntu版本号
方法一:
cat /etc/issue
返回结果:
Ubuntu 6.06.2 LTS \n \l
方法二:
sudo lsb_release -a
返回结果:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 6.06.2 LTS
Release: 6.06
Codename: dapper
方法三:
cat /etc/lsb-release
返回结果:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.06
DISTRIB_CODENAME=dapper
DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS"
方法四:
cat /proc/version
返回结果:
Linux version 2.6.15-51-386 ([email protected]) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 PREEMPT Tue Oct 23 21:42:16 UTC 2007
方法五:
uname -a
返回结果:
Linux jpsiteserver 2.6.15-51-386 #1 PREEMPT Tue Oct 23 21:42:16 UTC 2007 i686 GNU/Linux
方法六:仅仅查看内核版本
uname -r
返回结果:
2.6.15-51-386
1、查看内核版本命令:
1) cat /proc/version
2) uname -a
3) uname -r
2、查看发行版本命令
1) lsb_release -a
2) 用命令找到/etc目录下的issue文件release文件
二、android编译环境
编译android
apt-get install -y openssh-server ccache p7zip-full aptitude vim openjdk-8-jdk lynx-cur samba samba-common make gcc g++ libtool automake vim ruby pigz iotop nmon dstat htop atop smbclient cifs-utils libssl-dev
apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 dpkg-dev libsdl1.2-dev libesd0-dev git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 expect libexpat1-dev
lib32stdc++6
apt-get install -y build-essential make gcc g++ libc6-dev patch texinfo libncurses5-dev git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind wine tofrodos lib32z1 lib32ncurses5 git-core g++-multilib gcc-multilib libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev python-markdown libxml2-utils xsltproc zlib1g-dev:i386 u-boot-tools gawk lzop gettext texinfo libswitch-perl bc python-networkx perlbrew libxml-dom-perl
(i686-w64-mingw32-gcc)
apt-get install -y mingw-ocaml mingw-w64 mingw-w64-common mingw-w64-i686-dev mingw-w64-tools mingw-w64-x86-64-dev python-dev python-protobuf protobuf-compiler python-virtualenv python-pip
apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gdebi-core iotop nmon sysstat dstat g++-4.8 g++-4.8-multilib gcc-4.8 gcc-4.8-multilib (编译linux 版本需要降级cd /usr/bin/; ln -s gcc-4.8 gcc;ln -s g++-4.8 g++; cd /bin;ln -s bash sh) 这一步一定操作
apt-get install -y libwxgtk3.0-dev lib32readline6-dev libbz2-1.0:i386
apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gdebi-core iotop nmon sysstat dstat g++-4.8 g++-4.8-multilib gcc-4.8 gcc-4.8-multilib libwxgtk3.0-dev lib32readline6-dev libbz2-1.0:i386
(编译linux 版本需要降级cd /usr/bin/; ln -s gcc-4.8 gcc;ln -s g++-4.8 g++; cd /bin;ln -s bash sh) 这一步一定操作
上一篇: c++中的atoi()和stoi()函数的用法和区别
下一篇: vue组件间通信