Ubuntu 20.04預設的gcc版本是9.4.0,可用apt安裝gcc-8,但是gcc 7(含)以下就無法安裝。解決方法是先修改/etc/apt/sources.list,增加下面兩行:
deb http://dk.archive.ubuntu.com/ubuntu/ xenial main
deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe
上面加入了Ubuntu 16.04 Xenial Xerus (好客的非洲地松鼠)的套件庫,完成後執行
- sudo apt update
- sudo apt install g++-5 gcc-5
- which gcc-5 g++-5
- gcc-5 --version && g++-5 --version
- ./configure CC=gcc-5 GXX=g++-5 --prefix=/XX/YY/ZZ
參考資料
- Ubuntu 20.04 - gcc version lower than gcc-7:這邊除了安裝,還有說明如何用update-alternatives指令來將預設的gcc改成想要的版本
- Configure with a specified version of g++
- How to install multiple versions of GCC and G++ on Ubuntu 20.04
- http://old-releases.ubuntu.com/ubuntu/pool/universe/g/
- Ubuntu 20.04 安装 gcc 5.5.0 以及 CUDA,PyTorch,GCC 之间的关系:無superuser權限編譯舊版GCC的過程
_EOF_
A beautiful night in the swedish countryside, watercolor painting by Vladimir Volegov
Steps: 23, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 231221, Size: 512x256, Model hash: 6ce0161689, Model: v1-5-pruned-emaonly, Version: v1.6.1
Time taken: 1 min. 37.5 sec. on Nvidia MX550
A: 1.70 GB, R: 2.26 GB, Sys: 2.0/2 GB (100.0%)
沒有留言:
張貼留言