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?

Rocky LINUX へ NKF 2.1.5 導入

Posted at

NKF の 入手

2025年10月現在, OSDN関連の入手先は, 利用できません。

bash wget-nkf.sh
#!/usr/bin/bash

        LANG=C
        rpm -qa | grep -e wget 2>/dev/null
        [[ $? -ne 0 ]] && dnf -y install wget
        wget https://ftp.jaist.ac.jp/pub/sourceforge.jp/nkf/70406/nkf-2.1.5.tar.gz
# bash wget-nkf.sh
Last metadata expiration check: 0:24:38 ago on Sun Oct  5 19:57:27 2025.
Dependencies resolved.
=====================================================================================================================
 Package                Architecture             Version                           Repository                   Size
=====================================================================================================================
Installing:
 wget                   x86_64                   1.21.1-8.el9_4                    appstream                   768 k

Transaction Summary
=====================================================================================================================
Install  1 Package

Total download size: 768 k
Installed size: 3.1 M
Downloading Packages:
wget-1.21.1-8.el9_4.x86_64.rpm                                                       366 kB/s | 768 kB     00:02
---------------------------------------------------------------------------------------------------------------------
Total                                                                                297 kB/s | 768 kB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                             1/1
  Installing       : wget-1.21.1-8.el9_4.x86_64                                                                  1/1
  Running scriptlet: wget-1.21.1-8.el9_4.x86_64                                                                  1/1
  Verifying        : wget-1.21.1-8.el9_4.x86_64                                                                  1/1

Installed:
  wget-1.21.1-8.el9_4.x86_64

Complete!
--2025-10-05 20:22:08--  https://ftp.jaist.ac.jp/pub/sourceforge.jp/nkf/70406/nkf-2.1.5.tar.gz
Resolving ftp.jaist.ac.jp (ftp.jaist.ac.jp)... 150.65.7.130, 2001:df0:2ed:feed::feed
Connecting to ftp.jaist.ac.jp (ftp.jaist.ac.jp)|150.65.7.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 215879 (211K) [application/x-gzip]
Saving to: 'nkf-2.1.5.tar.gz'

nkf-2.1.5.tar.gz              100%[==============================================>] 210.82K  1.16MB/s    in 0.2s

2025-10-05 20:22:11 (1.16 MB/s) - 'nkf-2.1.5.tar.gz' saved [215879/215879]

NKF の 生成(make)

bash mk-nkf.sh
#!/usr/bin/bash

        LANG=C

        # インストールに必要な tar, make, gcc を導入
        for P in tar.x86_64 make.x86_64 gcc.x86_64
        do
                rpm -qa | grep -e $P 2>/dev/null
                [[ $? -ne 0 ]] && dnf -y install $P
        done

        # tar ball 展開
        tar xvf nkf-2.1.5.tar.gz

        cd nkf-2.1.5
        make
        make install

        # インストールされた 日本語 man を, utf-8 へ変換
        nkf --overwrite -w /usr/local/man/ja/man1/nkf.1

make install で インストールされる man(日本語)は、utf-8 では文字化けします。
生成された, nkf コマンドを使い, これを, utf-8 へ変換しています。

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?