0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSL2 の Ubuntu Ubuntu 20.04 LTS に gawk 5.3.0 をインストールしたい

Posted at

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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?