Ubuntu 18.04 LTSもUbuntu 16.04 LTSもパッケージを最新にしても令和は表示されない。
Ubuntu 19.04 Disco Dingoのlibc6を利用して、令和を表示させた。
Ubuntu 18.04
# apt update # apt upgrade # cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS" # dpkg -l | grep libc6 ii libc6:amd64 2.27-3ubuntu1 ... # date +%Ec -d 20190501 平成31年05月01日 00時00分00秒 # vi /etc/apt/apt.conf.d/01ubuntu APT::Default-Release "bionic"; # vi /etc/apt/sources.list ... deb http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/ disco main restricted # apt install libc6 -t disco パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下の追加パッケージがインストールされます: libc-bin libidn2-0 locales 提案パッケージ: glibc-doc 以下のパッケージはアップグレードされます: libc-bin libc6 libidn2-0 locales アップグレード: 4 個、新規インストール: 0 個、削除: 0 個、保留: 571 個。 7,244 kB のアーカイブを取得する必要があります。 この操作後に追加で 3,681 kB のディスク容量が消費されます。 続行しますか? [Y/n] y ... # dpkg -l | grep libc6 ii libc6:amd64 2.29-0ubuntu2 ... # date +%Ec -d 20190501 令和元年05月01日 00時00分00秒
Ubuntu 16.04
# apt update
# apt upgrade
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
# dpkg -l | grep libc6
ii libc6:amd64 2.23-0ubuntu11 ...
# date +%Ec -d 20190501
平成31年05月01日 00時00分00秒
# vi /etc/apt/apt.conf.d/01ubuntu
APT::Default-Release "xenial";
# vi /etc/apt/sources.list
...
deb http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu/ disco main restricted
# aptitude install libc6 -t disco
The following NEW packages will be installed:
libidn2-0{a} libunistring2{a}
The following packages will be upgraded:
libc-bin libc6 locales
3 packages upgraded, 2 newly installed, 0 to remove and 452 not upgraded.
Need to get 7,613 kB of archives. After unpacking 6,995 kB will be used.
The following packages have unmet dependencies:
libc6-dev : 依存: libc6 (= 2.23-0ubuntu11) but 2.29-0ubuntu2 is to be installed.
libc-dev-bin : 依存: libc6 (< 2.24) but 2.29-0ubuntu2 is to be installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) build-essential
2) g++
3) g++-5
4) libc-dev-bin
5) libc6-dev
6) libstdc++-5-dev
Leave the following dependencies unresolved:
7) gcc recommends libc6-dev | libc-dev
8) dpkg-dev recommends build-essential
9) gcc-5 recommends libc6-dev (>= 2.13-0ubuntu6)
10) libgcc-5-dev recommends libc6-dev (>= 2.13-0ubuntu6)
11) golang-1.12-go recommends g++
12) golang-1.12-go recommends libc6-dev
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Upgrade the following packages:
1) libc-dev-bin [2.23-0ubuntu11 (now, xenial-updates) -> 2.29-0ubuntu2 (disco)]
2) libc6-dev [2.23-0ubuntu11 (now, xenial-updates) -> 2.29-0ubuntu2 (disco)]
Accept this solution? [Y/n/q/?] y
...
# dpkg -l | grep libc6
ii libc6:amd64 2.29-0ubuntu2 ...
# date +%Ec -d 20190501
令和元年05月01日 00時00分00秒
参考
https://qiita.com/yosshy/items/4ed9e3e49cf346ca670d