ubuntu更换国内源
时间: 2023-08-11 19:56:40 浏览: 97
1. 打开终端,输入以下命令:
```
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
```
2. 通过以下命令检查是否成功更换源:
```
conda info
```
如果输出的信息中包含了清华源的地址,则说明更换成功。
相关问题
ubuntu 更换国内源
您可以通过以下步骤更换 Ubuntu 的国内源:
1. 打开终端(Terminal),输入以下命令备份原有的源列表文件:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2. 打开源列表文件:
```
sudo vim /etc/apt/sources.list
```
3. 将文件内容替换为以下内容(以清华大学的 Ubuntu 镜像为例):
```
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
```
4. 保存文件并退出 vim。
5. 运行以下命令更新源列表:
```
sudo apt-get update
```
这样,您就成功更换了 Ubuntu 的国内源。
ubuntu更换国内源下载tensorflow-lite armhf
你可以按照以下步骤更换Ubuntu的软件源,然后再下载tensorflow-lite armhf:
1. 打开终端,输入以下命令备份原始的软件源列表文件:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2. 编辑软件源列表文件,将所有的源地址更换为国内的镜像站点。以清华大学的镜像站点为例,可以运行以下命令:
```
sudo gedit /etc/apt/sources.list
```
然后将文件中的所有源地址替换为以下内容:
```
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
```
3. 更新软件源列表:
```
sudo apt-get update
```
4. 安装tensorflow-lite armhf:
```
sudo apt-get install tensorflow-lite:armhf
```
如果提示找不到该软件包,请尝试运行以下命令更新软件包列表:
```
sudo apt-get update
```
然后再尝试安装tensorflow-lite armhf。
阅读全文