Разбор ошибок Debian

Содержание
The repository does not have a Release file
Restarting networking failed because the control process exited with error code.
Failed to start A high performance web server and a reverse proxy server
(разные команды) command not found debian
user is not in the sudoers file
usermod: command not found
Возможные ошибки при установке Java

The repository does not have a Release file.

При попытке выполнить

sudo apt update

[sudo] password for andrei: Ign:1 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster InRelease Err:2 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs Err:3 http://deb.debian.org/debian buster InRelease Cannot initiate the connection to prod.debian.map.fastly.net:80 (2a04:4e42:14::204). - connect (101: Network is unreachable) Could not connect to prod.debian.map.fastly.net:80 (151.101.84.204), connection timed out Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:14::645). - connect (101: Network is unreachable) Could not connect to deb.debian.org:80 (151.101.86.133), connection timed out Err:4 http://deb.debian.org/debian buster-updates InRelease Cannot initiate the connection to deb.debian.org:80 (2a04:4e42:14::645). - connect (101: Network is unreachable) Err:5 http://security.debian.org/debian-security buster/updates InRelease Cannot initiate the connection to prod.debian.map.fastly.net:80 (2a04:4e42:14::204). - connect (101: Network is unreachable) Could not connect to prod.debian.map.fastly.net:80 (151.101.84.204), connection timed out Cannot initiate the connection to security.debian.org:80 (2a04:4e42:c00::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:200::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:400::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:a00::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:800::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:600::204). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:e00::204). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.0.204), connection timed out Could not connect to security.debian.org:80 (151.101.128.204), connection timed out Could not connect to security.debian.org:80 (151.101.192.204), connection timed out Could not connect to security.debian.org:80 (151.101.64.204), connection timed out Reading package lists... Done E: The repository 'cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release' does not have 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.

Проверяю souces.list

sudo vi /etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26]/ buster contrib main deb cdrom:[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26]/ buster contrib main deb http://deb.debian.org/linux/debian/ buster main deb-src http://deb.debian.org/linux/debian/ buster main deb http://security.debian.org/debian-security buster/updates main contrib deb-src http://security.debian.org/debian-security buster/updates main contrib # buster-updates, previously known as 'volatile' deb http://deb.debian.org/linux/debian/ buster-updates main contrib deb-src http://deb.debian.org/linux/debian/ buster-updates main contrib

Restarting networking failed because the control process exited with error code.

При попытке перезапустить сеть

andrei@debian:/etc/network$ sudo /etc/init.d/networking restart

[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

Оказалось, что при редактировании /etc/network/interfaces перепутал в названии интерфейса wlp1s0 l и 1 и написал вместо wlp1s0 wlpls0

Failed to start A high performance web server and a reverse proxy server

При попытке установить Nginx в Debian 10

sudo apt install nginx

Setting up libnginx-mod-http-upstream-fair (1.14.2-2+deb10u1) ... Setting up nginx-full (1.14.2-2+deb10u1) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. invoke-rc.d: initscript nginx, action "start" failed. ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2020-06-18 17:30:41 EEST; 12ms ago Docs: man:nginx(8) Process: 7196 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 7198 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE) Jun 18 17:30:39 debian nginx[7198]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 17:30:39 debian nginx[7198]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 17:30:40 debian nginx[7198]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 17:30:40 debian nginx[7198]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 17:30:40 debian nginx[7198]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 17:30:40 debian nginx[7198]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 17:30:41 debian nginx[7198]: nginx: [emerg] still could not bind() Jun 18 17:30:41 debian systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jun 18 17:30:41 debian systemd[1]: nginx.service: Failed with result 'exit-code'. Jun 18 17:30:41 debian systemd[1]: Failed to start A high performance web server and a reverse proxy server. dpkg: error processing package nginx-full (--configure): installed nginx-full package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of nginx: nginx depends on nginx-full (<< 1.14.2-2+deb10u1.1~) | nginx-light (<< 1.14.2-2+deb10u1.1~) | nginx-extras (<< 1.14.2-2+deb10u1.1~); however: Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed. nginx depends on nginx-full (>= 1.14.2-2+deb10u1) | nginx-light (>= 1.14.2-2+deb10u1) | nginx-extras (>= 1.14.2-2+deb10u1); however: Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed. dpkg: error processing package nginx (--configure): dependency problems - leaving unconfigured Processing triggers for man-db (2.8.5-2) ... Processing triggers for systemd (241-7~deb10u4) ... Errors were encountered while processing: nginx-full nginx E: Sub-process /usr/bin/dpkg returned an error code (1)

systemctl status nginx.service

● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2020-06-18 21:42:54 EEST; 5min ago Docs: man:nginx(8) Process: 15224 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 15225 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)

sudo journalctl -xe

-- Subject: A start job for unit nginx.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit nginx.service has begun execution. -- -- The job identifier is 2744. Jun 18 21:42:52 debian nginx[15225]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 21:42:52 debian nginx[15225]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 21:42:52 debian nginx[15225]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 21:42:52 debian nginx[15225]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 21:42:53 debian nginx[15225]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 21:42:53 debian nginx[15225]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 21:42:53 debian nginx[15225]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 21:42:53 debian nginx[15225]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 21:42:54 debian nginx[15225]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jun 18 21:42:54 debian nginx[15225]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Jun 18 21:42:54 debian nginx[15225]: nginx: [emerg] still could not bind() Jun 18 21:42:54 debian systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- An ExecStart= process belonging to unit nginx.service has exited. -- -- The process' exit code is 'exited' and its exit status is 1. Jun 18 21:42:54 debian systemd[1]: nginx.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The unit nginx.service has entered the 'failed' state with result 'exit-code'. Jun 18 21:42:54 debian systemd[1]: Failed to start A high performance web server and a reverse proxy server. -- Subject: A start job for unit nginx.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit nginx.service has finished with a failure. -- -- The job identifier is 2744 and the job result is failed. Jun 18 21:43:08 debian sudo[8241]: pam_unix(sudo:session): session closed for user root Jun 18 21:48:12 debian PackageKit[8233]: daemon quit Jun 18 21:48:12 debian systemd[1]: packagekit.service: Main process exited, code=killed, status=15/TERM -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- An ExecStart= process belonging to unit packagekit.service has exited. -- -- The process' exit code is 'killed' and its exit status is 15. Jun 18 21:48:12 debian systemd[1]: packagekit.service: Succeeded. -- Subject: Unit succeeded -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The unit packagekit.service has successfully entered the 'dead' state. Jun 18 21:50:45 debian sudo[19594]: andrei : TTY=pts/0 ; PWD=/home/andrei ; USER=root ; COMMAND=/usr/bin/journalctl -xe Jun 18 21:50:45 debian sudo[19594]: pam_unix(sudo:session): session opened for user root by andrei(uid=0)

Из логов можно сделать вывод, что порт 80, который нужен Nginx уже занят. Я так подозреваю, что Apache. Поэтому нужно удалить или отключить Apache и поставить Nginx

command not found
ifconfig command not found debian
man: command not found
adduser: command not found

ifconfig command not found debian

Если ifconfig выдаёт ошибку

ifconfig command not found debian

можно либо воспользоваться командой

ip addresses

Либо установить ifconfig

-bash: man: command not found

Чтобы установить справочник man

sudo apt update
sudo apt-get install man-db

bash: adduser: command not found

Обычно для создания и редактирования пользователей нужно иметь довольно много прав.

Часто это делается под root.

Начиная с Debian 10 нас ждёт сюрприз от разработчиков. Если Вы стали root по-старинке, выполнив su без агрументов Ваша системная переменная PATH скорее всего не содержит многих нужных директорий.

Всё потому, что теперь команда su идёт из другого package - util-linux вместо shadow и не обновляет PATH по умолчанию.

Что делать?

Попробуйте

su - root

Подробности здесь

user is not in the sudoers file

Означает, что пользователя user нужно добавить в группу sudo

Выполните

su -
usermod -a -G sudo user

usermod: command not found

Скорее всего эта ошибка появилась у вас в Debian 10 после выполнения su ( Подробности )

Выполните

su -

Возможные ошибки при установке Java

Could not get lock /var/lib/dpkg/lock

root@debian:/# apt-get install default-jre

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Означает, что у Вас запущен ещё один менеджер пакетов, например, Synaptic. Найдите его и закройте.

Unable to locate package default-jr

root@debian:/# apt-get install default-jre

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package default-jre

Означает, что найти default-jre не удалось. Проверьте sources.list

nano /etc/apt/sources.list

Контакты и сотрудничество:
Рекомендую наш хостинг beget.ru
Пишите на info@eth1.ru если Вы:
1. Хотите написать статью для нашего сайта или перевести статью на свой родной язык.
2. Хотите разместить на сайте рекламу, подходящуюю по тематике.
3. Реклама на моём сайте имеет максимальный уровень цензуры. Если Вы увидели рекламный блок недопустимый для просмотра детьми школьного возраста, вызывающий шок или вводящий в заблуждение - пожалуйста свяжитесь с нами по электронной почте
4. Нашли на сайте ошибку, неточности, баг и т.д. ... .......
5. Статьи можно расшарить в соцсетях, нажав на иконку сети: