目次
WSL2(ubuntu)でMariaDBを10.9から10.11にバージョンアップした件
久しぶりに、
sudo apt update
をやるとエラーになりました。
エラーになったのは「MariaDB」です。
エラーメッセージは以下の通り。
E: The repository 'https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.9/ubuntu focal Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
意味は
E: リポジトリ 'https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.9/ubuntu focal Release' には、もはや Release ファイルがありません。
N: このようなリポジトリからの更新は安全に行うことができないので、デフォルトで無効になっています。
N: リポジトリの作成とユーザー設定の詳細については apt-secure(8) man ページを参照してください。
などとなります。
MariaDB10.9のリポジトリがなくなってるぞ
URLを確認してみました。
確かに「NOT FOUND」になります。
https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.9/ubuntu
以下からリポジトリのリストをみてみたら「10.9」がなくなってます。
https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/
そりゃあ、NOT FOUNDになるわな・・と思いつつ、こんなこともあるんですね。
実は前回(2023年5月ころ)も同じエラーがでました。
でも、その時は忙しかったので放っておいて、3日後にupdateをやり直すと、エラーもなく終わりました。
続けて「sudo apt upgrade」をやったらエラーにはなったのですけれど。
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution) libreoffice
でも、「unmet dependencies」・・つまり、依存関係が壊れている・・だったので、修復インストールをやって解決できたのですけれど。
sudo apt --fix-broken install
今回はどうも無理っぽいです。
あきらめて、MariaDBのバージョンアップしようと思います。
MariaDBのバージョンアップ
MariaDBのダウンロードサイトを見て、10.11(10の最終版?)にすることにします。
JAPANの選択肢に山形大学がなくなってますね?
どうしたのかな・・とりあえず、Japan唯一の選択肢(Osaka)を選びます。
あとは、下に表示されたスクリプトを実行します。
10.9は使わないのでWSL2のubuntuの「/etc/apt/sources.list」から以下を消します。
deb https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.9/ubuntu focal main
そして、今度は「/etc/apt/sources.list.d」以下にしたの内容で「mariadb.sources」ファイルを作ります。
# MariaDB 10.11 repository list - created 2023-12-09 05:37 UTC
# https://mariadb.org/download/
X-Repolib-Name: MariaDB
Types: deb
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# URIs: https://deb.mariadb.org/10.11/ubuntu
URIs: https://mirrors.xtom.jp/mariadb/repo/10.11/ubuntu
Suites: focal
Components: main main/debug
Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp
さて。
sudo apt update
sudo apt upgrade
やってみます。
upgradeの最後のほうで、MariaDBのバージョンをどうするか聞いてくるので
Configuration file '/etc/mysql/mariadb.conf.d/50-server.cnf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** 50-server.cnf (Y/I/N/O/D/Z) [default=N] ? y
デフォルトは「N」・・つまり、10.9のままにする・・ですが、今回は「Y」・・10.11にあげる・・にしました。
とりあえず、OK。
動作確認も問題なかったので、やれやれです。
ではでは。