ln: failed to create symbolic link ‘easy_install-3.5’: *

Time:2021-7-12

Recently, due to the need of online environment, we have re installed and compiled Python 3.5.4 in Ubuntu, the basic image of docker. The following error is generated by building dockerfile:
ln: failed to create symbolic link 'easy_install-3.5': File exists
After troubleshooting, it is found that there is a problem with this module: when setting the soft connection, the corresponding file already exists

RUN cd /usr/local/bin \
        && ln -s easy_install-3.5 easy_install \
        && ln -s idle3 idle \
        && ln -s pydoc3 pydoc \
        && ln -s python3 python \
        && ln -s python3-config python-config

resolvent:

RUN cd /usr/local/bin \
        && ln -sf easy_install-3.5 easy_install \
        && ln -sf idle3 idle \
        && ln -sf pydoc3 pydoc \
        && ln -sf python3 python \
        && ln -sf python3-config python-config

-f. — force remove existing destination files is to use the – f parameter to cover the previous files!