#备份仓库源
root@ubuntu:~# cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak
#
# 修改仓库源为清华源
root@ubuntu:~# cat > /etc/apt/sources.list.d/ubuntu.sources << EOF
> Types: deb
> URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
> Suites: noble noble-updates noble-security
> Components: main restricted universe multiverse
> Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
> EOF
#
#查看
root@ubuntu:~# cat /etc/apt/sources.list.d/ubuntu.sources
Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
#
# 更新缓存
apt-get update
#
# 更新
apt-get upgrade
#
# 测试
root@ubuntu:~# apt install apache2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils libapr1t64 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1t64
liblua5.4-0 ssl-cert
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapr1t64 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1t64
liblua5.4-0 ssl-cert
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,083 kB of archives.
After this operation, 8,094 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
至此,Ubuntu24.04安装完成