Set Mirror of Packages
Posted newhappy98
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Set Mirror of Packages相关的知识,希望对你有一定的参考价值。
Ubuntu 20.04
# https://developer.aliyun.com/mirror/ubuntu
# backup
cp /etc/apt/sources.list /etc/apt/sources.list.bak
# install ca-certificates
apt install --yes --no-install-recommends ca-certificates
# set apt mirror
cat > /etc/apt/sources.list <<-\'EOF\'
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
EOF
# update
apt update
PyPI
# set pip mirror
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple
# set pdm mirror
pdm config pypi.url https://mirrors.aliyun.com/pypi/simple
NPM
# set npm mirror
npm config set registry https://registry.npmmirror.com
# set yarn mirror
yarn config set registry https://registry.npmmirror.com
# set pnpm mirror
pnpm config set registry https://registry.npmmirror.com
Composer
# set composer mirror
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
OpenShift ocp packages
以上是关于Set Mirror of Packages的主要内容,如果未能解决你的问题,请参考以下文章
Your requirements could not be resolved to an installable set of packages