Troubleshooting Debian errors
The repository does not have a Release file.
When trying to run
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.
I check 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/debian/ buster main deb-src http://deb.debian.org/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/debian/ buster-updates main contrib deb-src http://deb.debian.org/debian/ buster-updates main contrib
Restarting networking failed because the control process exited with error code.
When trying to restart the network
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.
It turned out that while editing /etc/network/interfaces I mixed up the letter l and the digit 1 in the interface name wlp1s0 wlpls0
Failed to start A high performance web server and a reverse proxy server
When trying to install Nginx on 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)
The logs suggest that port 80, which Nginx needs, is already in use. My guess is Apache. So you need to remove or disable Apache and install Nginx
| ifconfig command not found debian | |
| man: command not found | |
| adduser: command not found |
ifconfig command not found debian
If ifconfig returns an error
ifconfig command not found debian
you can either use the command
ip addresses
Or install ifconfig
-bash: man: command not found
To install the man pages
sudo apt update
sudo apt-get install man-db
bash: adduser: command not found
Usually, creating and editing users requires quite a lot of privileges.
This is often done as root.
Starting with Debian 10, the developers have a surprise for us. If you became root
the old way, by running su without arguments, your system variable
PATH
most likely does not contain many of the directories you need.
That is because the su command now comes from another package - util-linux instead of shadow
and does not update PATH by default.
What to do?
Try
su - root
Details here
user is not in the sudoers file
This means that the user user must be added to the sudo group
Run
su -
usermod -a -G sudo user
usermod: command not found
Most likely this error appeared in your Debian 10 after running su (
Details
)
Run
su -
Possible errors when installing 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?
This means that another package manager is running, for example, Synaptic. Find it and close it.
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
This means that default-jre could not be found. Check sources.list
nano /etc/apt/sources.list
Article author: Andrei Olegovich