apache2ctl Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Burgess85
Posts: 60
Joined: Sat Mar 20, 2021 5:03 pm

apache2ctl

Post by Burgess85 »

bash: apache2ctl: command not found

How do I resolve please?
User avatar
Joulinar
Posts: 5927
Joined: Sat Nov 16, 2019 12:49 am

Re: apache2ctl

Post by Joulinar »

Should be part of apache2 package. Did you install apache2 already?

https://packages.debian.org/search?sear ... e&arch=any
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Burgess85
Posts: 60
Joined: Sat Mar 20, 2021 5:03 pm

Re: apache2ctl

Post by Burgess85 »

Yes worked until upgrading to bullseye
Burgess85
Posts: 60
Joined: Sat Mar 20, 2021 5:03 pm

Re: apache2ctl

Post by Burgess85 »

How can I reinstall Apache and will it remove all my web folders?
User avatar
trendy
Posts: 366
Joined: Tue Feb 25, 2020 2:54 pm

Re: apache2ctl

Post by trendy »

dietpi-software reinstall 83
It won't remove your web servers, but you should always keep a backup! You will be reminded to take one before it starts reinstalling.
Burgess85
Posts: 60
Joined: Sat Mar 20, 2021 5:03 pm

Re: apache2ctl

Post by Burgess85 »

Did a reinstall of Apache and still the same
User avatar
MichaIng
Site Admin
Posts: 3349
Joined: Sat Nov 18, 2017 6:21 pm

Re: apache2ctl

Post by MichaIng »

Try:

Code: Select all

apt install --reinstall apache2
Burgess85
Posts: 60
Joined: Sat Mar 20, 2021 5:03 pm

Re: apache2ctl

Post by Burgess85 »

MichaIng wrote: Sun Sep 19, 2021 5:57 pm Try:

Code: Select all

apt install --reinstall apache2

Code: Select all

───────────────────────────────────────────────────── 15:00:44 BST 2021 armv7l
 DietPi v7.6.2 : 17:51 - Sun 09/19/21
 ───────────────────────────────────────────────────── are free software;
 - Device model : RPi 4 Model B (armv7l)ogram are described in the
 - CPU temp : 45'C : 113'F (Optimal temperature)
 - LAN IP : 192.168.86.55 (eth0)
 - MOTD : DietPi v7.6 release notes:LY NO WARRANTY, to the extent
          https://dietpi.com/docs/releases/#september-2021-version-76
 ─────────────────────────────────────────────────────42

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image by        : DietPi Core Team (pre-image: Raspberry Pi OS Lite)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Patreon Legends : Camry2731
 Contribute      : https://dietpi.com/contribute.html
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

dietpi@Burgess-Server:~$ apt install --reinstall apache2
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
dietpi@Burgess-Server:~$ sudo apt install --reinstall apache2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 266 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf apache2 armhf 2.4.48-3.1+deb11u1 [266 kB]
Fetched 266 kB in 0s (694 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 94863 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.48-3.1+deb11u1_armhf.deb ...
Unpacking apache2 (2.4.48-3.1+deb11u1) over (2.4.48-3.1+deb11u1) ...
Setting up apache2 (2.4.48-3.1+deb11u1) ...
apache-htcacheclean.service is a disabled or a static unit not running, not starting it.
dietpi@Burgess-Server:~$ apache2ctl
-bash: apache2ctl: command not found
dietpi@Burgess-Server:~$
User avatar
MichaIng
Site Admin
Posts: 3349
Joined: Sat Nov 18, 2017 6:21 pm

Re: apache2ctl

Post by MichaIng »

Please check the following:

Code: Select all

ls -l /usr/sbin/apache2ctl
which apache2ctl
echo $PATH
Burgess85
Posts: 60
Joined: Sat Mar 20, 2021 5:03 pm

Re: apache2ctl

Post by Burgess85 »

MichaIng wrote: Mon Sep 20, 2021 1:33 am Please check the following:

Code: Select all

ls -l /usr/sbin/apache2ctl
which apache2ctl
echo $PATH

Code: Select all

Linux Burgess-Server 5.10.60-v7l+ #1449 SMP Wed Aug 25 15:00:44 BST 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 ─────────────────────────────────────────────────────
 DietPi v7.6.2 : 18:34 - Mon 09/20/21
 ─────────────────────────────────────────────────────
 - Device model : RPi 4 Model B (armv7l)
 - CPU temp : 44'C : 111'F (Optimal temperature)
 - LAN IP : 192.168.86.55 (eth0)
 - MOTD : DietPi v7.6 release notes:
          https://dietpi.com/docs/releases/#september-2021-version-76
 ─────────────────────────────────────────────────────

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image by        : DietPi Core Team (pre-image: Raspberry Pi OS Lite)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Patreon Legends : Camry2731
 Contribute      : https://dietpi.com/contribute.html
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

dietpi@Burgess-Server:~$ ls -l /usr/sbin/apache2ctl
-rwxr-xr-x 1 root root 7229 Sep  1  2020 /usr/sbin/apache2ctl
dietpi@Burgess-Server:~$ which apache2ctl
dietpi@Burgess-Server:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
dietpi@Burgess-Server:~$
Post Reply