本文阅读量 次
1. Ubuntu 的基本使用¶
1.1 dpkg 的使用¶
1.1.1 查看本地都安装了哪些¶
dpkg -l
1.2 HowTo¶
1.2.1 查找软件有哪些版本¶
apt-cache policy libpq5 libpq-dev
libpq5:
Installed: 16.4-0ubuntu0.24.04.2
Candidate: 17.0-1.pgdg24.04+1
Version table:
17.0-1.pgdg24.04+1 500
500 https://apt.postgresql.org/pub/repos/apt noble-pgdg/main amd64 Packages
*** 16.4-0ubuntu0.24.04.2 500
500 http://mirrors.tencentyun.com/ubuntu noble-updates/main amd64 Packages
100 /var/lib/dpkg/status
16.2-1ubuntu4 500
500 http://mirrors.tencentyun.com/ubuntu noble/main amd64 Packages
libpq-dev:
Installed: 16.4-0ubuntu0.24.04.2
Candidate: 17.0-1.pgdg24.04+1
Version table:
17.0-1.pgdg24.04+1 500
500 https://apt.postgresql.org/pub/repos/apt noble-pgdg/main amd64 Packages
*** 16.4-0ubuntu0.24.04.2 500
500 http://mirrors.tencentyun.com/ubuntu noble-updates/main amd64 Packages
100 /var/lib/dpkg/status
16.2-1ubuntu4 500
500 http://mirrors.tencentyun.com/ubuntu noble/main amd64 Packages
也可以通过在线站点查找: https://packages.ubuntu.com/ ⧉
1.2.2 安装特定版本¶
基于上边已经找出来的版本,apt install
时增加版本号即可
apt install libpq-dev=16.4-0ubuntu0.24.04.2