From 290a7a49f37b7ea77be0652a83502c8df33fc815 Mon Sep 17 00:00:00 2001 From: luocai Date: Wed, 20 Nov 2024 16:08:36 +0800 Subject: [PATCH] support c++20 for ubuntu2204. --- Dockerfiles/ubuntu2204.dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dockerfiles/ubuntu2204.dockerfile b/Dockerfiles/ubuntu2204.dockerfile index 71a4ff5..f2ce46d 100644 --- a/Dockerfiles/ubuntu2204.dockerfile +++ b/Dockerfiles/ubuntu2204.dockerfile @@ -49,6 +49,18 @@ RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master && echo 'setopt no_share_history' >> ~/.oh-my-zsh/lib/history.zsh \ && chsh -s /bin/zsh root +RUN cd /root \ + && apt update \ + && apt install -y software-properties-common \ + && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ + && apt install gcc-13 g++-13 \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60 \ + && update-alternatives --config gcc \ + && update-alternatives --config g++ \ + && apt clean \ + && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* + RUN cd /root \ && apt update \ && apt install -y libgl1-mesa-dev libfontconfig1-dev libfreetype-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev \