unrarのインストールでエラー

unrarのインストールでエラー

某所からrar形式でファイルが送られてきました。
ちょいと調べるとunrarってなコマンドで展開できるらしい。早速インストール。

$ sudo apt-get install unrar
(中略)
openresty (1.17.8.2-1~bionic1) を設定しています ...
Job for openresty.service failed because the control process exited with error code.
See "systemctl status openresty.service" and "journalctl -xe" for details.
invoke-rc.d: initscript openresty, action "start" failed.
● openresty.service - The OpenResty Application Platform
   Loaded: loaded (/lib/systemd/system/openresty.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-10-15 09:23:28 JST; 19ms ago
  Process: 24793 ExecStart=/usr/local/openresty/nginx/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 24792 ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)

10月 15 09:23:25 ishtar systemd[1]: Starting The OpenResty Application Platform...
10月 15 09:23:25 ishtar nginx[24793]: nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)
10月 15 09:23:26 ishtar nginx[24793]: nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)
10月 15 09:23:26 ishtar nginx[24793]: nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)
10月 15 09:23:27 ishtar nginx[24793]: nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)
10月 15 09:23:27 ishtar nginx[24793]: nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)
10月 15 09:23:28 ishtar nginx[24793]: nginx: [emerg] still could not bind()
10月 15 09:23:28 ishtar systemd[1]: openresty.service: Control process exited, code=exited status=1
10月 15 09:23:28 ishtar systemd[1]: openresty.service: Failed with result 'exit-code'.
10月 15 09:23:28 ishtar systemd[1]: Failed to start The OpenResty Application Platform.
dpkg: パッケージ openresty の処理中にエラーが発生しました (--configure):
 installed openresty package post-installation script subprocess returned error exit status 1
dpkg: 依存関係の問題により openresty-resty の設定ができません:
 openresty-resty は以下に依存 (depends) します: openresty (>= 1.17.8.2) ...しかし:
  パッケージ openresty はまだ設定されていません。

なにやらエラー。unrarに必要なopenrestyってなやつを起動しようとして失敗しているので、インストールできませんよってことみたい。
で、どうして起動できなかったかというとTCP/8080がつかめなかったから。このポートはnginxでつかってるんだよ。ごめんね。
ってことでnginxを停止してから再度インストール。

$ sudo systemctl stop nginx
$ sudo apt-get install unrar

無事にインストールできました。