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

How to uninstall paramiko package and install specific version paramiko==1.18.5 package #424

Open
dhingrachirag opened this issue Nov 18, 2022 · 1 comment

Comments

@dhingrachirag
Copy link

Hi Hi I am facing below issue,

I am facing 1 issue where I am trying to uninstall paramiko package and install specific version paramiko==1.18.5 package.

I am using below docker file to execute:

FROM ppodgorsek/robot-framework:latest

USER root

## # Install system dependencies
RUN apk update \
   && apk --no-cache --virtual .build-deps add \
    gcc \
    g++ \
    libffi-dev \
    linux-headers \
    make \
    musl-dev \
    openssl-dev \
    which \
    wget \
    && \
#  Uninstall paramiko version
  pip3 uninstall parmiko \
    && \
# Install Robot Framework and specific paramiko version
  pip3 install \
    --no-cache-dir \
    -Iv paramiko==1.18.5 \
  && apk del --no-cache --update-cache .build-deps

USER ${ROBOT_UID}:${ROBOT_GID}

By using above docker image I am getting below error:

STEP 4: USER root
37848641cb590c96cb11fe6582a9931d00163e419bff12e42d0032d68d176f30
STEP 5: RUN apk update    && apk --no-cache --virtual .build-deps add     gcc     g++     libffi-dev     linux-headers     make     musl-dev     openssl-dev     which     wget     &&   pip3 uninstall parmiko     &&   pip3 install     --no-cache-dir     -Iv paramiko==1.18.5   && apk del --no-cache --update-cache .build-deps
cannot set HOME environment variable
/bin/sh: line 1: apk: command not found
Error: error building at STEP "RUN apk update    && apk --no-cache --virtual .build-deps add     gcc     g++     libffi-dev     linux-headers     make     musl-dev     openssl-dev     which     wget     &&   pip3 uninstall parmiko     &&   pip3 install     --no-cache-dir     -Iv paramiko==1.18.5   && apk del --no-cache --update-cache .build-deps": error while running runtime: exit status 127
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 125

Requesting you to please assist on this issue as struck in this from while.

@cas-technology
Copy link

The problem is that you are trying to use 'apk'. ppodgorsek/robot-framework is based on Fedora. You can use DNF.

Disclaimer: Untested, and I'm not too familiar with Fedora so use with caution.

FROM ppodgorsek/robot-framework:latest

USER root

## Install system dependencies
RUN dnf install -y \
    gcc \
    gcc-c++ \
    libffi-devel \
    glibc-headers \
    make \
    musl-devel \
    openssl-devel \
    which \
    wget \
    && \
# Uninstall paramiko version
    pip3 uninstall paramiko \
    && \
# Install Robot Framework and specific paramiko version
    pip3 install \
    --no-cache-dir \
    -Iv paramiko==1.18.5 \
    && dnf clean all

USER ${ROBOT_UID}:${ROBOT_GID}

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

2 participants