有兩種方法
第一種)查詢所有ubuntu版本可裝的版本package
sudo apt install devscripts
第一種)查詢所有ubuntu版本可裝的版本package
sudo apt install devscripts
rmadison gcc(ex:查詢gcc可用版本)
範例輸出:
gcc | 4:4.6.3-1ubuntu5 | precise | amd64, armel, armhf, i386, powerpc
gcc | 4:4.8.2-1ubuntu6 | trusty | amd64, arm64, armhf, i386, powerpc, ppc64el
gcc | 4:5.3.1-1ubuntu1 | xenial | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
gcc | 4:6.3.0-2ubuntu1 | zesty | amd64, arm64, armhf, i386, ppc64el, s390x
gcc | 4:7.2.0-1ubuntu1 | artful | amd64, arm64, armhf, i386, ppc64el, s390x
gcc | 4:7.2.0-1ubuntu1 | bionic | amd64, arm64, armhf, i386, ppc64el, s390x
範例輸出:
gcc | 4:4.6.3-1ubuntu5 | precise | amd64, armel, armhf, i386, powerpc
gcc | 4:4.8.2-1ubuntu6 | trusty | amd64, arm64, armhf, i386, powerpc, ppc64el
gcc | 4:5.3.1-1ubuntu1 | xenial | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
gcc | 4:6.3.0-2ubuntu1 | zesty | amd64, arm64, armhf, i386, ppc64el, s390x
gcc | 4:7.2.0-1ubuntu1 | artful | amd64, arm64, armhf, i386, ppc64el, s390x
gcc | 4:7.2.0-1ubuntu1 | bionic | amd64, arm64, armhf, i386, ppc64el, s390x
第二種)查詢目前系統版本可裝的版本package
sudo apt-cache madison gcc(ex: 查詢可裝的gcc版本)
範例輸出:
gcc | 4:5.3.1-1ubuntu1 | http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
gcc | 4:4.8.2-1ubuntu6 | http://dk.archive.ubuntu.com/ubuntu trusty/main amd64 Packages