2022年2月28日 星期一

Ubuntu 20 C++ Project Init

 

Dockerfile

FROM ubuntu:focal-20220113

USER root

RUN apt-get update

RUN apt-get -y install ninja-build clang file make cmake gdb

RUN apt-get -y install git

CMD tail -F /dev/null  # so that it will not close



Raspberry Pi Stretch to Bullseye (2017 to 2021)
sudo nano /etc/apt/sources.list
change
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
to
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
sudo apt update  # 950 packages can be upgraded
sudo apt upgrade
sudo reboot
lsb_rebease -d  # Linux 11 (bullseye) not Linux 8 (stretch)
cat /etc/debian_release  # Linux 11 (bullseye) not Linux 8 (stretch)

Raspberry Pi Gcc
sudo apt-get -y install gcc g++ ninja-build clang file make cmake gdb git
gcc --version  # version 10 not version 6
g++ -v # version 10 not version 6
clang --version  # version 11 not version 4
cmake --version # version 3.18, not so nice
# if see <optional> not found, likely g++ version 6 too old, need version 10 newer





沒有留言:

張貼留言

2007 to 2023 HP and Dell Servers Comparison

  HP Gen5 to Gen11  using ChatGPT HP ProLiant Gen Active Years CPU Socket Popular HP CPUs Cores Base Clock Max RAM Capacity Comparable Dell ...