① gawk-5.3.0.tar.gz
の入手
GNUからgawk-5.3.0.tar.gz
を入手し、任意のディレクトリに設置します。
② gawkのインストール
入手したgawk-5.3.0.tar.gz
を解凍し、インストール作業を行います。
# tar.gzファイルを解凍する
$ tar xvf gawk-5.3.0.tar.gz
# 解凍したディレクトリに移動する
$ cd gawk-5.3.0/
# makeファイルを生成する
$ ./configure
# gawkをインストールする
$ sudo make install
③ 稼働確認
インストールが正常に完了したら、~/.bash_profile
を再読み込みします。
source ~/.bash_profile
gawk 5.3.0 がインストールできたことを確認します。
$ gawk -V
GNU Awk 5.3.0, API 4.0, PMA Avon 8-g1
Copyright (C) 1989, 1991-2023 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
また、awkについてもgawk 5.3.0を参照していることを確認します。
$ awk -V
GNU Awk 5.3.0, API 4.0, PMA Avon 8-g1
Copyright (C) 1989, 1991-2023 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
環境情報
C:\>ver
Microsoft Windows [Version 10.0.22631.3593]
C:\>wsl --version
WSL バージョン: 2.0.14.0
カーネル バージョン: 5.15.133.1-1
WSLg バージョン: 1.0.59
MSRDC バージョン: 1.2.4677
Direct3D バージョン: 1.611.1-81528511
DXCore バージョン: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows バージョン: 10.0.22631.3593
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal