跳转至

1.mkdocs

1.安装Ubuntu操作系统

2.修改Ubuntu IP地址

1.查看当前的IP地址,将dhcp分配的IP修改成静态IP,或者管理员分配的IP。

ip a
great@ubuntu24:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:8b:4b:0f brd ff:ff:ff:ff:ff:ff
    altname enp3s0
    inet 192.168.4.38/24 brd 192.168.4.255 scope global ens160
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8b:4b0f/64 scope link
       valid_lft forever preferred_lft forever

2.修改配置文件

编辑配置文件/etc/netplan/50-cloud-init.yaml,按照下列参考参数配置成对应的IP。

vi  /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: no
      addresses:
        - 192.168.4.38/24
      routes:
        - to: 0.0.0.0/0
          via: 192.168.4.1
      nameservers:
        addresses:
          - 192.168.4.1

3.应用配置

netplan apply

4.查看结果

great@ubuntu24:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:8b:4b:0f brd ff:ff:ff:ff:ff:ff
    altname enp3s0
    inet 192.168.4.38/24 brd 192.168.4.255 scope global ens160
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe8b:4b0f/64 scope link
       valid_lft forever preferred_lft forever

3.更新系统软件

sudo apt-get update
great@ubuntu24:~$ sudo apt-get update
[sudo] password for great:
Get:1 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:2 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [618 kB]
Get:5 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [118 kB]
Get:6 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [8,960 B]
Get:7 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [625 kB]
Get:8 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [121 kB]
Get:9 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Components [212 B]
Get:10 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [804 kB]
Get:11 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [172 kB]
Get:12 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [52.0 kB]
Get:13 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [12.4 kB]
Get:14 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Components [212 B]
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease
Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease [126 kB]
Get:15 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease [126 kB]
Get:16 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 Packages [866 kB]
Get:17 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main Translation-en [196 kB]
Get:18 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 Components [151 kB]
Get:19 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 Packages [654 kB]
Get:20 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted Translation-en [128 kB]
Get:21 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 Components [212 B]
Get:22 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe amd64 Packages [1,015 kB]
Get:23 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe Translation-en [254 kB]
Get:24 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe amd64 Components [363 kB]
Get:25 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/multiverse amd64 Packages [16.3 kB]
Get:26 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/multiverse Translation-en [3,944 B]
Get:27 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/multiverse amd64 Components [940 B]
Get:28 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports/main amd64 Components [208 B]
Get:29 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports/restricted amd64 Components [216 B]
Get:30 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports/universe amd64 Packages [14.2 kB]
Get:31 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports/universe Translation-en [12.1 kB]
Get:32 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports/universe amd64 Components [20.0 kB]
Get:33 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports/multiverse amd64 Components [212 B]
Fetched 6,604 kB in 6s (1,127 kB/s)
Reading package lists... Done
great@ubuntu24:~$

4.安装PIP及依赖软件

1.查看当前系统的python版本

python3 -V
great@ubuntu24:~$ python3 -V
Python 3.12.3

2.安装python3-pip

查看是否安装pip软件

which pip pip3

经检查,发现未安装pip,pip3。使用以下命令安装python3-pip

sudo apt install python3-pip
great@ubuntu24:~$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential bzip2 cpp cpp-13 cpp-13-x86-64-linux-gnu cpp-x86-64-linux-gnu dpkg-dev fakeroot g++ g++-13 g++-13-x86-64-linux-gnu
  g++-x86-64-linux-gnu gcc gcc-13 gcc-13-base gcc-13-x86-64-linux-gnu gcc-x86-64-linux-gnu javascript-common libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan8 libatomic1
  libbinutils libcc1-0 libctf-nobfd0 libctf0 libdpkg-perl libexpat1 libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-13-dev libgomp1 libgprofng0 libhwasan0 libisl23 libitm1 libjs-jquery
  libjs-sphinxdoc libjs-underscore liblsan0 libmpc3 libpython3-dev libpython3.12-dev libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 libquadmath0 libsframe1 libstdc++-13-dev libtsan2
  libubsan1 lto-disabled-list make python3-dev python3-wheel python3.12 python3.12-dev python3.12-minimal zlib1g-dev
Suggested packages:
  binutils-doc gprofng-gui bzip2-doc cpp-doc gcc-13-locales cpp-13-doc debian-keyring g++-multilib g++-13-multilib gcc-13-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-doc
  gcc-13-multilib gdb-x86-64-linux-gnu apache2 | lighttpd | httpd bzr libstdc++-13-doc make-doc python3.12-venv python3.12-doc binfmt-support
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential bzip2 cpp cpp-13 cpp-13-x86-64-linux-gnu cpp-x86-64-linux-gnu dpkg-dev fakeroot g++ g++-13 g++-13-x86-64-linux-gnu
  g++-x86-64-linux-gnu gcc gcc-13 gcc-13-base gcc-13-x86-64-linux-gnu gcc-x86-64-linux-gnu javascript-common libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan8 libatomic1
  libbinutils libcc1-0 libctf-nobfd0 libctf0 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-13-dev libgomp1 libgprofng0 libhwasan0 libisl23 libitm1 libjs-jquery libjs-sphinxdoc
  libjs-underscore liblsan0 libmpc3 libpython3-dev libpython3.12-dev libquadmath0 libsframe1 libstdc++-13-dev libtsan2 libubsan1 lto-disabled-list make python3-dev python3-pip python3-wheel
  python3.12-dev zlib1g-dev
The following packages will be upgraded:
  libexpat1 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 python3.12 python3.12-minimal
6 upgraded, 59 newly installed, 0 to remove and 191 not upgraded.
Need to get 85.3 MB of archives.
After this operation, 271 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libexpat1 amd64 2.6.1-2ubuntu0.2 [87.4 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libpython3.12t64 amd64 3.12.3-1ubuntu0.5 [2,339 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 python3.12 amd64 3.12.3-1ubuntu0.5 [651 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libpython3.12-stdlib amd64 3.12.3-1ubuntu0.5 [2,069 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 python3.12-minimal amd64 3.12.3-1ubuntu0.5 [2,342 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libpython3.12-minimal amd64 3.12.3-1ubuntu0.5 [835 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 binutils-common amd64 2.42-4ubuntu2.3 [239 kB]
Get:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libsframe1 amd64 2.42-4ubuntu2.3 [14.9 kB]
Get:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libbinutils amd64 2.42-4ubuntu2.3 [575 kB]
Get:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libctf-nobfd0 amd64 2.42-4ubuntu2.3 [97.1 kB]
Get:11 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libctf0 amd64 2.42-4ubuntu2.3 [94.5 kB]
Get:12 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libgprofng0 amd64 2.42-4ubuntu2.3 [849 kB]
Get:13 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.42-4ubuntu2.3 [2,463 kB]
Get:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 binutils amd64 2.42-4ubuntu2.3 [18.1 kB]
Get:15 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 gcc-13-base amd64 13.3.0-6ubuntu2~24.04 [51.5 kB]
Get:16 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libisl23 amd64 0.26-3build1.1 [680 kB]
Get:17 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libmpc3 amd64 1.3.1-1build1.1 [54.6 kB]
Get:18 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 cpp-13-x86-64-linux-gnu amd64 13.3.0-6ubuntu2~24.04 [10.7 MB]
Get:19 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 cpp-13 amd64 13.3.0-6ubuntu2~24.04 [1,038 B]
Get:20 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 cpp-x86-64-linux-gnu amd64 4:13.2.0-7ubuntu1 [5,326 B]
Get:21 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 cpp amd64 4:13.2.0-7ubuntu1 [22.4 kB]
Get:22 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libcc1-0 amd64 14.2.0-4ubuntu2~24.04 [48.0 kB]
Get:23 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libgomp1 amd64 14.2.0-4ubuntu2~24.04 [148 kB]
Get:24 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libitm1 amd64 14.2.0-4ubuntu2~24.04 [29.7 kB]
Get:25 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libatomic1 amd64 14.2.0-4ubuntu2~24.04 [10.5 kB]
Get:26 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libasan8 amd64 14.2.0-4ubuntu2~24.04 [3,031 kB]
Get:27 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 liblsan0 amd64 14.2.0-4ubuntu2~24.04 [1,322 kB]
Get:28 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libtsan2 amd64 14.2.0-4ubuntu2~24.04 [2,772 kB]
Get:29 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libubsan1 amd64 14.2.0-4ubuntu2~24.04 [1,184 kB]
Get:30 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libhwasan0 amd64 14.2.0-4ubuntu2~24.04 [1,641 kB]
Get:31 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libquadmath0 amd64 14.2.0-4ubuntu2~24.04 [153 kB]
Get:32 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libgcc-13-dev amd64 13.3.0-6ubuntu2~24.04 [2,681 kB]
Get:33 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 gcc-13-x86-64-linux-gnu amd64 13.3.0-6ubuntu2~24.04 [21.1 MB]
Get:34 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 gcc-13 amd64 13.3.0-6ubuntu2~24.04 [494 kB]
Get:35 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 gcc-x86-64-linux-gnu amd64 4:13.2.0-7ubuntu1 [1,212 B]
Get:36 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 gcc amd64 4:13.2.0-7ubuntu1 [5,018 B]
Get:37 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 libstdc++-13-dev amd64 13.3.0-6ubuntu2~24.04 [2,420 kB]
Get:38 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 g++-13-x86-64-linux-gnu amd64 13.3.0-6ubuntu2~24.04 [12.2 MB]
Get:39 http://cn.archive.ubuntu.com/ubuntu noble-updates/main amd64 g++-13 amd64 13.3.0-6ubuntu2~24.04 [16.1 kB]
Get:40 http://cn.archive.ubuntu.com/ubuntu noble/main amd64 g++-x86-64-linux-gnu amd64 4:13.2.0-7ubuntu1 [964 B]
Get:41 http://cn.archive.ubuntu.com/ubuntu noble/main amd64 g++ amd64 4:13.2.0-7ubuntu1 [1,100 B]
Get:42 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 make amd64 4.3-4.1build2 [180 kB]
Get:43 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libdpkg-perl all 1.22.6ubuntu6.1 [269 kB]
Get:44 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 bzip2 amd64 1.0.8-5.1build0.1 [34.5 kB]
Get:45 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 lto-disabled-list all 47 [12.4 kB]
Get:46 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 dpkg-dev all 1.22.6ubuntu6.1 [1,074 kB]
Get:47 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 build-essential amd64 12.10ubuntu1 [4,928 B]
Get:48 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 libfakeroot amd64 1.33-1 [32.4 kB]
Get:49 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 fakeroot amd64 1.33-1 [67.2 kB]
Get:50 http://cn.archive.ubuntu.com/ubuntu noble/main amd64 javascript-common all 11+nmu1 [5,936 B]
Get:51 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 libalgorithm-diff-perl all 1.201-1 [41.8 kB]
Get:52 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 libalgorithm-diff-xs-perl amd64 0.04-8build3 [11.2 kB]
Get:53 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 libalgorithm-merge-perl all 0.08-5 [11.4 kB]
Get:54 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libexpat1-dev amd64 2.6.1-2ubuntu0.2 [998 kB]
Get:55 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 libfile-fcntllock-perl amd64 0.22-4ubuntu5 [30.7 kB]
Get:56 http://cn.archive.ubuntu.com/ubuntu noble/main amd64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB]
Get:57 http://cn.archive.ubuntu.com/ubuntu noble/main amd64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB]
Get:58 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 libjs-sphinxdoc all 7.2.6-6 [149 kB]
Get:59 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 zlib1g-dev amd64 1:1.3.dfsg-3.1ubuntu2.1 [894 kB]
Get:60 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libpython3.12-dev amd64 3.12.3-1ubuntu0.5 [5,675 kB]
Get:61 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 libpython3-dev amd64 3.12.3-0ubuntu2 [10.3 kB]
Get:62 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 python3.12-dev amd64 3.12.3-1ubuntu0.5 [498 kB]
Get:63 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/main amd64 python3-dev amd64 3.12.3-0ubuntu2 [26.7 kB]
Get:64 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/universe amd64 python3-wheel all 0.42.0-2 [53.1 kB]
Get:65 http://cn.archive.ubuntu.com/ubuntu noble-updates/universe amd64 python3-pip all 24.0+dfsg-1ubuntu1.1 [1,317 kB]
Fetched 85.3 MB in 19s (4,590 kB/s)
Extracting templates from packages: 100%
(Reading database ... 83525 files and directories currently installed.)
Preparing to unpack .../00-libexpat1_2.6.1-2ubuntu0.2_amd64.deb ...
Unpacking libexpat1:amd64 (2.6.1-2ubuntu0.2) over (2.6.1-2ubuntu0.1) ...
Preparing to unpack .../01-libpython3.12t64_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking libpython3.12t64:amd64 (3.12.3-1ubuntu0.5) over (3.12.3-1ubuntu0.2) ...
Preparing to unpack .../02-python3.12_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking python3.12 (3.12.3-1ubuntu0.5) over (3.12.3-1ubuntu0.2) ...
Preparing to unpack .../03-libpython3.12-stdlib_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking libpython3.12-stdlib:amd64 (3.12.3-1ubuntu0.5) over (3.12.3-1ubuntu0.2) ...
Preparing to unpack .../04-python3.12-minimal_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking python3.12-minimal (3.12.3-1ubuntu0.5) over (3.12.3-1ubuntu0.2) ...
Preparing to unpack .../05-libpython3.12-minimal_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking libpython3.12-minimal:amd64 (3.12.3-1ubuntu0.5) over (3.12.3-1ubuntu0.2) ...
Selecting previously unselected package binutils-common:amd64.
Preparing to unpack .../06-binutils-common_2.42-4ubuntu2.3_amd64.deb ...
Unpacking binutils-common:amd64 (2.42-4ubuntu2.3) ...
Selecting previously unselected package libsframe1:amd64.
Preparing to unpack .../07-libsframe1_2.42-4ubuntu2.3_amd64.deb ...
Unpacking libsframe1:amd64 (2.42-4ubuntu2.3) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../08-libbinutils_2.42-4ubuntu2.3_amd64.deb ...
Unpacking libbinutils:amd64 (2.42-4ubuntu2.3) ...
Selecting previously unselected package libctf-nobfd0:amd64.
Preparing to unpack .../09-libctf-nobfd0_2.42-4ubuntu2.3_amd64.deb ...
Unpacking libctf-nobfd0:amd64 (2.42-4ubuntu2.3) ...
Selecting previously unselected package libctf0:amd64.
Preparing to unpack .../10-libctf0_2.42-4ubuntu2.3_amd64.deb ...
Unpacking libctf0:amd64 (2.42-4ubuntu2.3) ...
Selecting previously unselected package libgprofng0:amd64.
Preparing to unpack .../11-libgprofng0_2.42-4ubuntu2.3_amd64.deb ...
Unpacking libgprofng0:amd64 (2.42-4ubuntu2.3) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../12-binutils-x86-64-linux-gnu_2.42-4ubuntu2.3_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.42-4ubuntu2.3) ...
Selecting previously unselected package binutils.
Preparing to unpack .../13-binutils_2.42-4ubuntu2.3_amd64.deb ...
Unpacking binutils (2.42-4ubuntu2.3) ...
Selecting previously unselected package gcc-13-base:amd64.
Preparing to unpack .../14-gcc-13-base_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking gcc-13-base:amd64 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package libisl23:amd64.
Preparing to unpack .../15-libisl23_0.26-3build1.1_amd64.deb ...
Unpacking libisl23:amd64 (0.26-3build1.1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../16-libmpc3_1.3.1-1build1.1_amd64.deb ...
Unpacking libmpc3:amd64 (1.3.1-1build1.1) ...
Selecting previously unselected package cpp-13-x86-64-linux-gnu.
Preparing to unpack .../17-cpp-13-x86-64-linux-gnu_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking cpp-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package cpp-13.
Preparing to unpack .../18-cpp-13_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking cpp-13 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package cpp-x86-64-linux-gnu.
Preparing to unpack .../19-cpp-x86-64-linux-gnu_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking cpp-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../20-cpp_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking cpp (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../21-libcc1-0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libcc1-0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../22-libgomp1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libgomp1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../23-libitm1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libitm1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../24-libatomic1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libatomic1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libasan8:amd64.
Preparing to unpack .../25-libasan8_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libasan8:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../26-liblsan0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking liblsan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libtsan2:amd64.
Preparing to unpack .../27-libtsan2_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libtsan2:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../28-libubsan1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libubsan1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libhwasan0:amd64.
Preparing to unpack .../29-libhwasan0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libhwasan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../30-libquadmath0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libquadmath0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libgcc-13-dev:amd64.
Preparing to unpack .../31-libgcc-13-dev_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking libgcc-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package gcc-13-x86-64-linux-gnu.
Preparing to unpack .../32-gcc-13-x86-64-linux-gnu_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking gcc-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package gcc-13.
Preparing to unpack .../33-gcc-13_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking gcc-13 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package gcc-x86-64-linux-gnu.
Preparing to unpack .../34-gcc-x86-64-linux-gnu_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking gcc-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../35-gcc_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking gcc (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package libstdc++-13-dev:amd64.
Preparing to unpack .../36-libstdc++-13-dev_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking libstdc++-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package g++-13-x86-64-linux-gnu.
Preparing to unpack .../37-g++-13-x86-64-linux-gnu_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking g++-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package g++-13.
Preparing to unpack .../38-g++-13_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking g++-13 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package g++-x86-64-linux-gnu.
Preparing to unpack .../39-g++-x86-64-linux-gnu_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking g++-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package g++.
Preparing to unpack .../40-g++_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking g++ (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package make.
Preparing to unpack .../41-make_4.3-4.1build2_amd64.deb ...
Unpacking make (4.3-4.1build2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../42-libdpkg-perl_1.22.6ubuntu6.1_all.deb ...
Unpacking libdpkg-perl (1.22.6ubuntu6.1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../43-bzip2_1.0.8-5.1build0.1_amd64.deb ...
Unpacking bzip2 (1.0.8-5.1build0.1) ...
Selecting previously unselected package lto-disabled-list.
Preparing to unpack .../44-lto-disabled-list_47_all.deb ...
Unpacking lto-disabled-list (47) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../45-dpkg-dev_1.22.6ubuntu6.1_all.deb ...
Unpacking dpkg-dev (1.22.6ubuntu6.1) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../46-build-essential_12.10ubuntu1_amd64.deb ...
Unpacking build-essential (12.10ubuntu1) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../47-libfakeroot_1.33-1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.33-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../48-fakeroot_1.33-1_amd64.deb ...
Unpacking fakeroot (1.33-1) ...
Selecting previously unselected package javascript-common.
Preparing to unpack .../49-javascript-common_11+nmu1_all.deb ...
Unpacking javascript-common (11+nmu1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../50-libalgorithm-diff-perl_1.201-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.201-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl:amd64.
Preparing to unpack .../51-libalgorithm-diff-xs-perl_0.04-8build3_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl:amd64 (0.04-8build3) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../52-libalgorithm-merge-perl_0.08-5_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-5) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../53-libexpat1-dev_2.6.1-2ubuntu0.2_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.6.1-2ubuntu0.2) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../54-libfile-fcntllock-perl_0.22-4ubuntu5_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-4ubuntu5) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../55-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ...
Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...
Selecting previously unselected package libjs-underscore.
Preparing to unpack .../56-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ...
Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack .../57-libjs-sphinxdoc_7.2.6-6_all.deb ...
Unpacking libjs-sphinxdoc (7.2.6-6) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../58-zlib1g-dev_1%3a1.3.dfsg-3.1ubuntu2.1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.3.dfsg-3.1ubuntu2.1) ...
Selecting previously unselected package libpython3.12-dev:amd64.
Preparing to unpack .../59-libpython3.12-dev_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking libpython3.12-dev:amd64 (3.12.3-1ubuntu0.5) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../60-libpython3-dev_3.12.3-0ubuntu2_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.12.3-0ubuntu2) ...
Selecting previously unselected package python3.12-dev.
Preparing to unpack .../61-python3.12-dev_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking python3.12-dev (3.12.3-1ubuntu0.5) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../62-python3-dev_3.12.3-0ubuntu2_amd64.deb ...
Unpacking python3-dev (3.12.3-0ubuntu2) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../63-python3-wheel_0.42.0-2_all.deb ...
Unpacking python3-wheel (0.42.0-2) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../64-python3-pip_24.0+dfsg-1ubuntu1.1_all.deb ...
Unpacking python3-pip (24.0+dfsg-1ubuntu1.1) ...
Setting up libexpat1:amd64 (2.6.1-2ubuntu0.2) ...
Setting up javascript-common (11+nmu1) ...
Setting up lto-disabled-list (47) ...
Setting up libfile-fcntllock-perl (0.22-4ubuntu5) ...
Setting up libalgorithm-diff-perl (1.201-1) ...
Setting up libpython3.12-minimal:amd64 (3.12.3-1ubuntu0.5) ...
Setting up binutils-common:amd64 (2.42-4ubuntu2.3) ...
Setting up libctf-nobfd0:amd64 (2.42-4ubuntu2.3) ...
Setting up libgomp1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up bzip2 (1.0.8-5.1build0.1) ...
Setting up python3-wheel (0.42.0-2) ...
Setting up libsframe1:amd64 (2.42-4ubuntu2.3) ...
Setting up libfakeroot:amd64 (1.33-1) ...
Setting up fakeroot (1.33-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up gcc-13-base:amd64 (13.3.0-6ubuntu2~24.04) ...
Setting up libexpat1-dev:amd64 (2.6.1-2ubuntu0.2) ...
Setting up make (4.3-4.1build2) ...
Setting up libquadmath0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libmpc3:amd64 (1.3.1-1build1.1) ...
Setting up libatomic1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up python3-pip (24.0+dfsg-1ubuntu1.1) ...
Setting up libdpkg-perl (1.22.6ubuntu6.1) ...
Setting up libubsan1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up zlib1g-dev:amd64 (1:1.3.dfsg-3.1ubuntu2.1) ...
Setting up libhwasan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libasan8:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libtsan2:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...
Setting up libbinutils:amd64 (2.42-4ubuntu2.3) ...
Setting up libisl23:amd64 (0.26-3build1.1) ...
Setting up libalgorithm-diff-xs-perl:amd64 (0.04-8build3) ...
Setting up libcc1-0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up liblsan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libitm1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...
Setting up libalgorithm-merge-perl (0.08-5) ...
Setting up libctf0:amd64 (2.42-4ubuntu2.3) ...
Setting up python3.12-minimal (3.12.3-1ubuntu0.5) ...
Setting up libpython3.12-stdlib:amd64 (3.12.3-1ubuntu0.5) ...
Setting up cpp-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Setting up python3.12 (3.12.3-1ubuntu0.5) ...
Setting up libpython3.12t64:amd64 (3.12.3-1ubuntu0.5) ...
Setting up libgprofng0:amd64 (2.42-4ubuntu2.3) ...
Setting up libjs-sphinxdoc (7.2.6-6) ...
Setting up libgcc-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Setting up libstdc++-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Setting up binutils-x86-64-linux-gnu (2.42-4ubuntu2.3) ...
Setting up cpp-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Setting up cpp-13 (13.3.0-6ubuntu2~24.04) ...
Setting up gcc-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Setting up libpython3.12-dev:amd64 (3.12.3-1ubuntu0.5) ...
Setting up binutils (2.42-4ubuntu2.3) ...
Setting up dpkg-dev (1.22.6ubuntu6.1) ...
Setting up gcc-13 (13.3.0-6ubuntu2~24.04) ...
Setting up python3.12-dev (3.12.3-1ubuntu0.5) ...
Setting up cpp (4:13.2.0-7ubuntu1) ...
Setting up libpython3-dev:amd64 (3.12.3-0ubuntu2) ...
Setting up g++-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Setting up gcc-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Setting up gcc (4:13.2.0-7ubuntu1) ...
Setting up python3-dev (3.12.3-0ubuntu2) ...
Setting up g++-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Setting up g++-13 (13.3.0-6ubuntu2~24.04) ...
Setting up g++ (4:13.2.0-7ubuntu1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.10ubuntu1) ...
Processing triggers for systemd (255.4-1ubuntu8.4) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
Scanning processes...
Scanning candidates...
Scanning linux images...

Running kernel seems to be up-to-date.

Restarting services...
 systemctl restart polkit.service

Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart unattended-upgrades.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

再次检查,可以发现工具已经安装。

great@ubuntu24:~$ which pip pip3
/usr/bin/pip
/usr/bin/pip3

直接使用pip安装工具会报错

great@ubuntu24:~$ python3.12 -m pip install mkdocs-material==9.5.48
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
great@ubuntu24:~$
great@ubuntu24:~$ sudo apt install pipx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  python3-argcomplete python3-packaging python3-pip-whl python3-platformdirs python3-psutil python3-setuptools-whl python3-userpath python3-venv python3.12-venv
The following NEW packages will be installed:
  pipx python3-argcomplete python3-packaging python3-pip-whl python3-platformdirs python3-psutil python3-setuptools-whl python3-userpath python3-venv python3.12-venv
0 upgraded, 10 newly installed, 0 to remove and 148 not upgraded.
Need to get 3,508 kB of archives.
After this operation, 7,832 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu noble-updates/universe amd64 python3-pip-whl all 24.0+dfsg-1ubuntu1.1 [1,703 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe amd64 python3-setuptools-whl all 68.1.2-2ubuntu1.1 [716 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe amd64 python3.12-venv amd64 3.12.3-1ubuntu0.5 [5,678 B]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe amd64 python3-venv amd64 3.12.3-0ubuntu2 [1,034 B]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/universe amd64 python3-argcomplete all 3.1.4-1ubuntu0.1 [33.8 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 python3-packaging all 24.0-1 [41.1 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 python3-platformdirs all 4.2.0-1 [16.1 kB]
Get:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/universe amd64 python3-userpath all 1.9.1-1 [9,416 B]
Get:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/universe amd64 pipx all 1.4.3-1 [787 kB]
Get:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 python3-psutil amd64 5.9.8-2build2 [195 kB]
Fetched 3,508 kB in 24s (148 kB/s)
Selecting previously unselected package python3-pip-whl.
(Reading database ... 124835 files and directories currently installed.)
Preparing to unpack .../0-python3-pip-whl_24.0+dfsg-1ubuntu1.1_all.deb ...
Unpacking python3-pip-whl (24.0+dfsg-1ubuntu1.1) ...
Selecting previously unselected package python3-setuptools-whl.
Preparing to unpack .../1-python3-setuptools-whl_68.1.2-2ubuntu1.1_all.deb ...
Unpacking python3-setuptools-whl (68.1.2-2ubuntu1.1) ...
Selecting previously unselected package python3.12-venv.
Preparing to unpack .../2-python3.12-venv_3.12.3-1ubuntu0.5_amd64.deb ...
Unpacking python3.12-venv (3.12.3-1ubuntu0.5) ...
Selecting previously unselected package python3-venv.
Preparing to unpack .../3-python3-venv_3.12.3-0ubuntu2_amd64.deb ...
Unpacking python3-venv (3.12.3-0ubuntu2) ...
Selecting previously unselected package python3-argcomplete.
Preparing to unpack .../4-python3-argcomplete_3.1.4-1ubuntu0.1_all.deb ...
Unpacking python3-argcomplete (3.1.4-1ubuntu0.1) ...
Selecting previously unselected package python3-packaging.
Preparing to unpack .../5-python3-packaging_24.0-1_all.deb ...
Unpacking python3-packaging (24.0-1) ...
Selecting previously unselected package python3-platformdirs.
Preparing to unpack .../6-python3-platformdirs_4.2.0-1_all.deb ...
Unpacking python3-platformdirs (4.2.0-1) ...
Selecting previously unselected package python3-userpath.
Preparing to unpack .../7-python3-userpath_1.9.1-1_all.deb ...
Unpacking python3-userpath (1.9.1-1) ...
Selecting previously unselected package pipx.
Preparing to unpack .../8-pipx_1.4.3-1_all.deb ...
Unpacking pipx (1.4.3-1) ...
Selecting previously unselected package python3-psutil.
Preparing to unpack .../9-python3-psutil_5.9.8-2build2_amd64.deb ...
Unpacking python3-psutil (5.9.8-2build2) ...
Setting up python3-setuptools-whl (68.1.2-2ubuntu1.1) ...
Setting up python3-pip-whl (24.0+dfsg-1ubuntu1.1) ...
Setting up python3-platformdirs (4.2.0-1) ...
Setting up python3-psutil (5.9.8-2build2) ...
Setting up python3-packaging (24.0-1) ...
Setting up python3-argcomplete (3.1.4-1ubuntu0.1) ...
Setting up python3-userpath (1.9.1-1) ...
Setting up python3.12-venv (3.12.3-1ubuntu0.5) ...
Setting up python3-venv (3.12.3-0ubuntu2) ...
Setting up pipx (1.4.3-1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Scanning processes...
Scanning candidates...
Scanning linux images...

Pending kernel upgrade!
Running kernel version:
  6.8.0-48-generic
Diagnostics:
  The currently running kernel version is not the expected kernel version 6.8.0-52-generic.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.

Restarting services...

Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart getty@tty1.service
 systemctl restart getty@tty6.service
 systemctl restart systemd-logind.service
 systemctl restart unattended-upgrades.service

No containers need to be restarted.

User sessions running outdated binaries:
 great @ session #6: sshd[1658,1735]
 great @ user manager service: systemd[1200]

No VM guests are running outdated hypervisor (qemu) binaries on this host.
great@ubuntu24:~$

5.配置python3.12-venv

great@ubuntu24:~$ sudo apt install python3.12-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3.12-venv is already the newest version (3.12.3-1ubuntu0.5).
python3.12-venv set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 148 not upgraded.
great@ubuntu24:~$ python3 -m venv ~/.venvs/python
great@ubuntu24:~$
great@ubuntu24:~$ ls  -la .venvs/
total 12
drwxrwxr-x 3 great great 4096 Feb 24 06:28 .
drwxr-x--- 6 great great 4096 Feb 24 06:28 ..
drwxrwxr-x 5 great great 4096 Feb 24 06:28 python

6.安装mkdocs及其插件

编辑环境文件,一次性安装

vi requirements.txt
mkdocs-material==9.5.48
mkdocs-glightbox==0.4.0
mkdocs-exclude-search==0.6.6

直接执行安装会很慢,需要配置成南京大学开源镜像网站才会更快

/home/great/.venvs/python/bin/python3.12 -m pip config set global.index-url https://mirror.nju.edu.cn/pypi/web/simple
great@ubuntu24:~$ /home/great/.venvs/python/bin/python3.12 -m pip config set global.index-url https://mirror.nju.edu.cn/pypi/web/simple
Writing to /home/great/.config/pip/pip.conf

执行安装

/home/great/.venvs/python/bin/python3.12 -m pip install -r requirements.txt
great@ubuntu24:~$ /home/great/.venvs/python/bin/python3.12 -m pip install -r requirements.txt
Looking in indexes: https://mirror.nju.edu.cn/pypi/web/simple
Collecting mkdocs-material==9.5.48 (from -r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/3e/c2/5cb2482c12d3473c00b6a8b8fe7305613142d418d87871edb83a9eb89981/mkdocs_material-9.5.48-py3-none-any.whl (8.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.7/8.7 MB 31.1 MB/s eta 0:00:00
Collecting mkdocs-glightbox==0.4.0 (from -r requirements.txt (line 2))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/c1/72/b0c2128bb569c732c11ae8e49a777089e77d83c05946062caa19b841e6fb/mkdocs_glightbox-0.4.0-py3-none-any.whl (31 kB)
Collecting mkdocs-exclude-search==0.6.6 (from -r requirements.txt (line 3))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/3b/ef/9af45ffb1bdba684a0694922abae0bb771e9777aba005933f838b7f1bcea/mkdocs_exclude_search-0.6.6-py3-none-any.whl (7.8 kB)
Collecting babel~=2.10 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl (10.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 52.5 MB/s eta 0:00:00
Collecting colorama~=0.4 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting jinja2~=3.0 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/bd/0f/2ba5fbcd631e3e88689309dbe978c5769e883e4b84ebfe7da30b43275c5a/jinja2-3.1.5-py3-none-any.whl (134 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.6/134.6 kB 28.7 MB/s eta 0:00:00
Collecting markdown~=3.2 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/3f/08/83871f3c50fc983b88547c196d11cf8c3340e37c32d2e9d6152abe2c61f7/Markdown-3.7-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.3/106.3 kB 6.1 MB/s eta 0:00:00
Collecting mkdocs-material-extensions~=1.3 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl (8.7 kB)
Collecting mkdocs~=1.6 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/22/5b/dbc6a8cddc9cfa9c4971d59fb12bb8d42e161b7e7f8cc89e49137c5b279c/mkdocs-1.6.1-py3-none-any.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 43.4 MB/s eta 0:00:00
Collecting paginate~=0.5 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/90/96/04b8e52da071d28f5e21a805b19cb9390aa17a47462ac87f5e2696b9566d/paginate-0.5.7-py2.py3-none-any.whl (13 kB)
Collecting pygments~=2.16 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 70.1 MB/s eta 0:00:00
Collecting pymdown-extensions~=10.2 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/eb/f5/b9e2a42aa8f9e34d52d66de87941ecd236570c7ed2e87775ed23bbe4e224/pymdown_extensions-10.14.3-py3-none-any.whl (264 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 264.5/264.5 kB 30.2 MB/s eta 0:00:00
Collecting regex>=2022.4 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/fb/13/e3b075031a738c9598c51cfbc4c7879e26729c53aa9cca59211c44235314/regex-2024.11.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (796 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 796.9/796.9 kB 57.2 MB/s eta 0:00:00
Collecting requests~=2.26 (from mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 kB 15.1 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0 (from jinja2~=3.0->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23 kB)
Collecting click>=7.0 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.2/98.2 kB 23.0 MB/s eta 0:00:00
Collecting ghp-import>=1.0 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl (11 kB)
Collecting mergedeep>=1.3.4 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/2c/19/04f9b178c2d8a15b076c8b5140708fa6ffc5601fb6f1e975537072df5b2a/mergedeep-1.3.4-py3-none-any.whl (6.4 kB)
Collecting mkdocs-get-deps>=0.2.0 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/9f/d4/029f984e8d3f3b6b726bd33cafc473b75e9e44c0f7e80a5b29abc466bdea/mkdocs_get_deps-0.2.0-py3-none-any.whl (9.5 kB)
Collecting packaging>=20.5 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 12.9 MB/s eta 0:00:00
Collecting pathspec>=0.11.1 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl (31 kB)
Collecting pyyaml-env-tag>=0.1 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/5a/66/bbb1dd374f5c870f59c5bb1db0e18cbe7fa739415a24cbd95b2d1f5ae0c4/pyyaml_env_tag-0.1-py3-none-any.whl (3.9 kB)
Collecting pyyaml>=5.1 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (767 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 767.5/767.5 kB 45.1 MB/s eta 0:00:00
Collecting watchdog>=2.0 (from mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.1/79.1 kB 14.4 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2 (from requests~=2.26->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/3e/a2/513f6cbe752421f16d969e32f3583762bfd583848b763913ddab8d9bfd4f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (145 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.3/145.3 kB 22.6 MB/s eta 0:00:00
Collecting idna<4,>=2.5 (from requests~=2.26->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.4/70.4 kB 16.8 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1 (from requests~=2.26->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.4/128.4 kB 26.2 MB/s eta 0:00:00
Collecting certifi>=2017.4.17 (from requests~=2.26->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl (166 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.4/166.4 kB 31.6 MB/s eta 0:00:00
Collecting python-dateutil>=2.8.1 (from ghp-import>=1.0->mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 39.1 MB/s eta 0:00:00
Collecting platformdirs>=2.2.0 (from mkdocs-get-deps>=0.2.0->mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl (18 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.1->ghp-import>=1.0->mkdocs~=1.6->mkdocs-material==9.5.48->-r requirements.txt (line 1))
  Downloading https://mirror.nju.edu.cn/pypi/web/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: paginate, mkdocs-glightbox, watchdog, urllib3, six, regex, pyyaml, pygments, platformdirs, pathspec, packaging, mkdocs-material-extensions, mergedeep, MarkupSafe, markdown, idna, colorama, click, charset-normalizer, certifi, babel, requests, pyyaml-env-tag, python-dateutil, pymdown-extensions, mkdocs-get-deps, jinja2, ghp-import, mkdocs, mkdocs-material, mkdocs-exclude-search
Successfully installed MarkupSafe-3.0.2 babel-2.17.0 certifi-2025.1.31 charset-normalizer-3.4.1 click-8.1.8 colorama-0.4.6 ghp-import-2.1.0 idna-3.10 jinja2-3.1.5 markdown-3.7 mergedeep-1.3.4 mkdocs-1.6.1 mkdocs-exclude-search-0.6.6 mkdocs-get-deps-0.2.0 mkdocs-glightbox-0.4.0 mkdocs-material-9.5.48 mkdocs-material-extensions-1.3.1 packaging-24.2 paginate-0.5.7 pathspec-0.12.1 platformdirs-4.3.6 pygments-2.19.1 pymdown-extensions-10.14.3 python-dateutil-2.9.0.post0 pyyaml-6.0.2 pyyaml-env-tag-0.1 regex-2024.11.6 requests-2.32.3 six-1.17.0 urllib3-2.3.0 watchdog-6.0.0
great@ubuntu24:~$