在微软商店安装Ubuntu18.04

1634993387(1).png
在程序控制面板打开允许子系统运行
Windows更新里打开开发者模式

在sources.list文件中添加内容

打开sources.list文件

  1. sudo vim /etc/apt/sources.list

i 进入编辑状态,最末端添加

  1. deb [ arch=amd64 ] https://downloads.skewed.de/apt bionic main

Esc退出编辑页面,再按:wq

https://blog.csdn.net/weixin_45850145/article/details/108375282

更新apt-get源

  1. sudo apt-get update

遇到报错

  1. Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
  2. Ign:2 https://downloads.skewed.de/apt bionic InRelease
  3. Err:3 https://downloads.skewed.de/apt bionic Release
  4. Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: xx.xxx.xxx.xx 443]
  5. Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
  6. Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
  7. Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
  8. Reading package lists... Done
  9. E: The repository 'https://downloads.skewed.de/apt bionic Release' does not have a Release file.
  10. N: Updating from such a repository can't be done securely, and is therefore disabled by default.
  11. N: See apt-secure(8) manpage for repository creation and user configuration details.

解决方法:

  1. sudo apt install ca-certificates

https://askubuntu.com/questions/1095266/apt-get-update-failed-because-certificate-verification-failed-because-handshake

  1. sudo apt-key adv --keyserver keys.openpgp.org --recv-key 612DEFB798507F25
  2. -------------------------------------------------------------------------------------
  3. Executing: /tmp/apt-key-gpghome.zH3fZl2ngw/gpg.1.sh --keyserver keys.openpgp.org --recv-key 612DEFB798507F25
  4. gpg: key 612DEFB798507F25: public key "Tiago de Paula Peixoto <tiago@skewed.de>" imported
  5. gpg: Total number processed: 1
  6. gpg: imported: 1

再来一次apt-get就可以了

  1. sudo apt-get update
  2. ---------------------------------------------------------------------------------
  3. Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
  4. Get:2 https://downloads.skewed.de/apt bionic InRelease [4310 B]
  5. Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
  6. Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
  7. Get:5 https://downloads.skewed.de/apt bionic/main amd64 Packages [3305 B]
  8. Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
  9. Fetched 260 kB in 12s (21.4 kB/s)
  10. Reading package lists... Done

安装graph-tool

  1. apt-get install python3-graph-tool

Python中导入graph-tool库

image.png
exit()退出python
在Ubuntu终端下输入
cd /usr/lib/python3/dist-packages
可以看到该目录下有graph_tool文件夹,然后将graph_tool复制到e盘。
cp -r graph_tool /mnt/e