AWS 的 Lightsail 提供的 FreeBSD 版本是 13.1 ,使用 freebsd-update
升级到 14.1
后,出现了以下错误:
$ pkg update
ld-elf.so.1: Shared object "libssl.so.111" not found, required by "pkg"
修复方法,强制重新安装 pkg
修复依赖问题:
$ pkg-static install -f pkg
pkg-static: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended
Updating FreeBSD repository catalogue...
pkg-static: Repository FreeBSD has a wrong packagesite, need to re-create database
Fetching meta.conf: 100% 178 B 0.2kB/s 00:01
Fetching data.pkg: 100% 7 MiB 7.3MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 34088 packages processed.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be REINSTALLED:
pkg-1.21.3 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64')
Number of packages to be reinstalled: 1
The process will require 4 MiB more space.
12 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching pkg-1.21.3.pkg: 100% 12 MiB 12.4MB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Reinstalling pkg-1.21.3...
[1/1] Extracting pkg-1.21.3: 100%
然后再强制更新一下 pkg
的数据库:
$ pkg upgrade -f
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (13 candidates): 100%
Processing candidates (13 candidates): 100%
The following 14 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
aws-ec2-imdsv2-get: 1.0.5_3
Installed packages to be UPGRADED:
amazon-ssm-agent: 2.3.1205.0_13 -> 2.3.1205.0_22
ca_root_nss: 3.89 -> 3.93_2
ebsnvme-id: 1.0.2 -> 1.0.2_1
ec2-scripts: 1.11 -> 1.12
firstboot-freebsd-update: 1.3 -> 1.4
isc-dhcp44-client: 4.4.3P1 -> 4.4.3P1_1
Installed packages to be REINSTALLED:
firstboot-pkgs-1.6
gettext-runtime-0.22.5 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64')
indexinfo-0.3.1 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64')
libevent-2.1.12 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64')
pkg-1.21.3
sudo-1.9.15p5_4
tmux-3.3a_2
Number of packages to be installed: 1
Number of packages to be upgraded: 6
Number of packages to be reinstalled: 7
18 MiB to be downloaded.
Proceed with this action? [y/N]: y