Ubuntu20.04にswift: error while loading shared libraries: libtinfo.so.5の解決対策

エラー現象
# swift –version
swift: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

対策
# apt update

Fetched 18.3 MB in 1min 5s (280 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
37 packages can be upgraded. Run 'apt list –upgradable’ to see them.
# apt install libtinfo5

Selecting previously unselected package libtinfo5:amd64.
(Reading database … 32160 files and directories currently installed.)
Preparing to unpack …/libtinfo5_6.2-0ubuntu2_amd64.deb …
Unpacking libtinfo5:amd64 (6.2-0ubuntu2) …
Setting up libtinfo5:amd64 (6.2-0ubuntu2) …
Processing triggers for libc-bin (2.31-0ubuntu9.2) …

# swift –version
Swift version 4.1.1 (swift-4.1.1-RELEASE)
Target: x86_64-unknown-linux-gnu

Ubuntu

Posted by arkgame