「Swift5.2.3」swift: error while loading shared libraries: libtinfo.so.5の解決方法
エラーメッセージ
swift: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
対策
$ sudo apt-get install libtinfo5
[sudo] password for arte:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
libtinfo5
0 upgraded, 1 newly installed, 0 to remove and 150 not upgraded.
Need to get 83.0 kB of archives.
After this operation, 535 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 libtinfo5 amd64 6.2-0ubuntu2 [83.0 kB]
Fetched 83.0 kB in 2s (50.0 kB/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database … 40532 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) …
swiftバージョン確認
$ swift –version
Swift version 5.2.3 (swift-5.2.3-RELEASE)
Target: x86_64-unknown-linux-gnu