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

Problems with ubuntu:20.04 #204

Closed
ClausKlein opened this issue Sep 11, 2023 · 2 comments · Fixed by #205
Closed

Problems with ubuntu:20.04 #204

ClausKlein opened this issue Sep 11, 2023 · 2 comments · Fixed by #205

Comments

@ClausKlein
Copy link

44.10 /usr/local/bin/setup-cpp -> /usr/local/lib/node_modules/setup-cpp/dist/legacy/setup-cpp.js
44.10 npm WARN notsup Unsupported engine for setup-cpp@0.35.6: wanted: {"node":">=12.x"} (current: {"node":"10.19.0","npm":"6.14.4"})
44.10 npm WARN notsup Not compatible with your version of node/npm: setup-cpp@0.35.6
44.11 
44.11 + setup-cpp@0.35.6
RUN apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \
    # install nodejs
    apt-get install -y --no-install-recommends git nodejs npm && \
    # install setup-cpp
    npm install -g setup-cpp@v0.35.6 && \
    # install the compiler and tools
    setup-cpp \
        --nala true \
        --compiler gcc \
        --cmake true \
        --ninja true \
        --python true \
        --make true \
        --gcovr true \
        --doxygen true \
        --ccache true && \
    # cleanup
    nala autoremove -y && \
    nala autopurge -y && \
    apt-get clean && \
    nala clean --lists && \
    rm -rf /var/lib/apt/lists/* && \
    rm -rf /tmp/*
@aminya
Copy link
Owner

aminya commented Sep 11, 2023

setup-cpp requires Node 12 or higher. Here I added a docker file for installing Nodejs on Ubuntu 20:

RUN apt-get update -qq && \
# install latest nodejs on ubuntu 20.04
apt-get update -qq && \
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends nodejs && \
# install setup-cpp

Alternatively, you can use the binaries that are self-contained:
https://github.com/aminya/setup-cpp#with-executable

@ClausKlein
Copy link
Author

ClausKlein commented Sep 11, 2023

Thanks, I forgot the ca-certifiacates!

see ClausKlein/docker_build#1

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

Successfully merging a pull request may close this issue.

2 participants