DEV Community

Masui Masanori
Masui Masanori

Posted on

Installing Nginx on Linux Mint 22

Intro

I just started using Linux Mint, so this time I will install Nginx.

Adding a repository

The basic installation procedure is the same as when I installed on Xubuntu 22.04.

After I added the Nginx repository, I got a warning on executing "sudo apt update".

... 無視:8 http://nginx.org/packages/ubuntu wilma InRelease ヒット:9 http://archive.ubuntu.com/ubuntu noble-updates InRelease ヒット:10 http://archive.ubuntu.com/ubuntu noble-backports InRelease エラー:11 http://nginx.org/packages/ubuntu wilma Release 404 Not Found [IP: 2a05:d014:5c0:2601::6 80] パッケージリストを読み込んでいます... 完了 E: リポジトリ http://nginx.org/packages/ubuntu wilma Release には Release ファイルがありません。 N: このようなリポジトリから更新を安全に行うことができないので、デフォルトでは更新が無効になっています。 N: リポジトリの作成とユーザ設定の詳細は、apt-secure(8) man ページを参照してください。 
Enter fullscreen mode Exit fullscreen mode

When I add the repository, I need to explicitly specify the Ubuntu version instead of using "lsb_release -cs"

echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ http://nginx.org/packages/ubuntu noble nginx" \ | sudo tee /etc/apt/sources.list.d/nginx.list 
Enter fullscreen mode Exit fullscreen mode

The version of Ubuntu that Linux Mint is based on can be obtained using the following command.

cat /etc/os-release 
Enter fullscreen mode Exit fullscreen mode

Results

NAME="Linux Mint" VERSION="22 (Wilma)" ID=linuxmint ID_LIKE="ubuntu debian" PRETTY_NAME="Linux Mint 22" VERSION_ID="22" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.linuxmint.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=wilma UBUNTU_CODENAME=noble 
Enter fullscreen mode Exit fullscreen mode

Specifying the repository architecture

I have another warning when I execute "sudo apt update".

... 取得:10 http://nginx.org/packages/ubuntu noble InRelease [2,843 B] 取得:11 http://nginx.org/packages/ubuntu noble/nginx amd64 Packages [9,372 B] 12.2 kB を 2秒 で取得しました (6,647 B/s) パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています... 完了 状態情報を読み取っています... 完了 パッケージはすべて最新です。 N: リポジトリ 'http://nginx.org/packages/ubuntu noble InRelease' がアーキテクチャ 'i386' をサポートしないため設定ファイル 'nginx/binary-i386/Packages' の取得をスキップ 
Enter fullscreen mode Exit fullscreen mode

I should specify the architecture in "/etc/apt/sources.list.d/nginx.list".

/etc/apt/sources.list.d/nginx.list

deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg arch=amd64] http://nginx.org/packages/ubuntu noble nginx:q 
Enter fullscreen mode Exit fullscreen mode

Resources

Top comments (0)