Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在debian中编译PolarDB开发环境报错 #11

Open
digoal opened this issue Dec 6, 2024 · 0 comments
Open

在debian中编译PolarDB开发环境报错 #11

digoal opened this issue Dec 6, 2024 · 0 comments

Comments

@digoal
Copy link

digoal commented Dec 6, 2024

在debian中编译PolarDB开发环境报错, 缺少PolarDB需要的gcc-10或llvm-15版本.

PolarDB官方手册给出了构建基于CentOS、Rocky、ubuntu、Anolis各版本Docker镜像的方法. 详见: 《如何构建PolarDB Docker镜像 OR 本地编译PolarDB?》

但是怎么能少了debian? debian是市场占有率前五的Linux发行版(Ubuntu, CentOS, Red Hat, SUSE, Debian), 众所周知ubuntu的LTS版也是基于debian而来. 在centos不再作为rhel的下游发行版后, 一些centos用户可能会转向debian或其他操作系统.

所以希望PolarDB有基于debian主流版本12的Dockerfile或docker image.

debian 12为例, 参考上面那篇文章, 把https://github.com/ApsaraDB/polardb-pg-docker-images/blob/main/Dockerfile-devel-ubuntu22.04里的基础镜像改成FROM ubuntu22.04改成FROM debian:12后build报错

docker pull --platform=linux/arm64 debian:12  
  
docker build --platform=linux/arm64 -t="polardb/polardb_pg_devel:debian12" --no-cache . 2>&1 | tee ./logs/build.log    

报错是缺少gcc-10

#9 0.528 E: Unable to locate package gcc-10  
#9 0.528 E: Unable to locate package g++-10  
#9 ERROR: process "/bin/sh -c apt install -y         gcc-10         g++-10         llvm-15-dev         clang-15         make         gdb         pkg-config         locales &&     update-alternatives --install         /usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave         /usr/bin/g++ g++ /usr/bin/g++-10 &&     update-alternatives --install         /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-15 60 --slave         /usr/bin/clang++ clang++ /usr/bin/clang++-15 --slave         /usr/bin/clang clang /usr/bin/clang-15 &&     apt clean -y" did not complete successfully: exit code: 100  
------  
 > [ 5/14] RUN apt install -y         gcc-10         g++-10         llvm-15-dev         clang-15         make         gdb         pkg-config         locales &&     update-alternatives --install         /usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave         /usr/bin/g++ g++ /usr/bin/g++-10 &&     update-alternatives --install         /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-15 60 --slave         /usr/bin/clang++ clang++ /usr/bin/clang++-15 --slave         /usr/bin/clang clang /usr/bin/clang-15 &&     apt clean -y:  
  
0.440 Building dependency tree...  
0.521 Reading state information...  
0.528 E: Unable to locate package gcc-10  
0.528 E: Unable to locate package g++-10  
------  
Dockerfile:22  
--------------------  
  21 |     # GCC (force 10) and LLVM (force to 15)  
  22 | >>> RUN apt install -y \  
  23 | >>>         gcc-10 \  
  24 | >>>         g++-10 \  
  25 | >>>         llvm-15-dev \  
  26 | >>>         clang-15 \  
  27 | >>>         make \  
  28 | >>>         gdb \  
  29 | >>>         pkg-config \  
  30 | >>>         locales && \  
  31 | >>>     update-alternatives --install \  
  32 | >>>         /usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave \  
  33 | >>>         /usr/bin/g++ g++ /usr/bin/g++-10 && \  
  34 | >>>     update-alternatives --install \  
  35 | >>>         /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-15 60 --slave \  
  36 | >>>         /usr/bin/clang++ clang++ /usr/bin/clang++-15 --slave \  
  37 | >>>         /usr/bin/clang clang /usr/bin/clang-15 && \  
  38 | >>>     apt clean -y  
  39 |     # Generate locale  
--------------------  
ERROR: failed to solve: process "/bin/sh -c apt install -y         gcc-10         g++-10         llvm-15-dev         clang-15         make         gdb         pkg-config         locales &&     update-al  

而如果使用debian 11时, 报错则是缺少llvm-15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant