I try to enable module version for apache2, with a2enmod version but return a error ERROR: Module version does not exist!
How do I install this module??
Thanks
covener
17.1k2 gold badges30 silver badges41 bronze badges
asked Jul 25, 2016 at 12:54
mod_version is statically compiled into Debian/Ubuntu’s apache2 packages. You can’t install or enable it separately. It’s directives will just work out of the box.
apachectl -M will show you the loaded modules.
moTHO.
1931 silver badge20 bronze badges
answered Aug 7, 2016 at 21:03
covenercovener
17.1k2 gold badges30 silver badges41 bronze badges
The ERROR: Module version does not exist! and apachectl -M | grep version outputs version_module (static) then its mean mod_version is statically compiled into apache2 package and works automatically.
answered Oct 7, 2020 at 7:27
Ali RazaAli Raza
5476 silver badges17 bronze badges
- Печать
Страницы: [1] Вниз
Тема: Установка Apache: ERROR: Module version does not exist! [Решено] (Прочитано 665 раз)
0 Пользователей и 1 Гость просматривают эту тему.

akrav
На Ubuntu 16.04.6 и 18.04.3 устанавливаем apache, выключаем необходимые модули.
sudo apt updateИсполнение команды «sudo a2enmod version» приводит к «ERROR: Module version does not exist!». При этом результат команды «sudo apachectl -M» выдает, что модуль доступен. Подскажите, пожалуйста, возможные варианты решения.
sudo apt list --upgradable
sudo apt install apache2
sudo a2enmod version
« Последнее редактирование: 18 Марта 2020, 11:10:23 от zg_nico »

bezbo
version_module (static)
выключаем необходимые модули
и
a2enmod
двойной «Когнитивный диссонанс»…
два вопроса:
1. зачем отключать необходимые для работы модули
2. странное выключение командой «включить модуль» (en = enable)
- Печать
Страницы: [1] Вверх
How to enable Apache mod_php using a2enmod, and how to find out what the name of the module is.
6349 views
By. Jacob
Edited: 2022-08-01 07:23
ERROR: Module php7 does not exist!
When trying to enable mod_php using the a2enmod command you may run into a message stating that the module does not exist; this is because the module is named php7.4 (for the latest version) rather than «php7».
To enable mod_php, type the following command:
The practice of naming various software by the version number is very bad and unintuitive for users. We can hope that we will some day have a «common name» that links to the latest version by default. This would probably avoid confusion caused by version numbers.
Of course, there are also circumstances where you want to install a specific version, such as when you are trying to maintain support for older software that only runs on older versions of PHP; but I think this happens so rarely nowadays that it is more the exception than the rule.
How to find the correct version
I would much prefer that «php» was an alias linked to the latest version of PHP — but you do get used to these things after a while. When using apt to install PHP, and if in doubt, we can simply search for packages that contain «PHP» in their name:
To get a list of installed Apache modules, try running the following command:
sudo apt-cache search libapache2*
This should result in something like:
libapache2-mod-php - server-side, HTML-embedded scripting language (Apache 2 module) (default) libapache2-mod-php7.4 - server-side, HTML-embedded scripting language (Apache 2 module)
Then simply enable the latest version:
-
How to have files uploaded through SFTP correctly inherit the group permissions of the parent directory.
-
Tutorial showing how to configure a VirtualBox Guest VM with HOST-only and NAT adapter, while using the WWW folder from the HOST OS.
-
Allow and Deny are being replaced with Require from mod_authz_host.
More in: Apache
When I go to pages in localhost, only php code is shown. This version:
$ php -v
PHP 7.0.10-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.10-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
I tried to do Upgrade to 16.04. php7 not working in browser but
sudo a2enmod php7.0
ERROR: Module php7.0 does not exist!
When I click tab while
sudo a2enmod php7
it completes to
sudo a2enmod php7.0.load.dpkg-dist
but result is same
$ sudo a2enmod php7.0.load.dpkg-dist
ERROR: Module php7.0.load.dpkg-dist does not exist!
I installed php like this:
sudo apt-get update
sudo apt-get remove php5-common -y
sudo apt-get purge php5-common -y
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
sudo apt-get --purge autoremove -y
I did not enable fpm.
I have all these packages.
$ a2enmod php
php5.6 php7.0.load.dpkg-dist
$ a2enmod php5.6
Considering dependency mpm_prefork for php5.6:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php5.6, aborting
I delete 5.6 but it’s still shown; why?
Я пытаюсь включить версию модуля для apache2 с a2enmod version, но возвращаю ошибку ERROR: Module version does not exist!
Как установить этот модуль??
Благодарность
2 ответа
mod_version статически скомпилирован в пакеты Debian/Ubuntu apache2. Вы не можете установить или включить его отдельно. Его директивы будут работать из коробки.
apachectl -M покажет вам загруженные модули.
16
moTHO.
8 Окт 2020 в 12:53
ERROR: Module version does not exist! и apachectl -M | grep version выводят version_module (static), тогда их средняя версия mod_version статически компилируется в пакет apache2 и работает автоматически.
0
Ali Raza
7 Окт 2020 в 10:27
Upgrade PHP version to PHP 7.4 on Ubuntu. You can upgrade your current PHP version to the latest release PHP 7.4 on your Ubuntu 18.04.
This upgrade is tested on virtual machine instance running Ubuntu 18.04 OS on Google Cloud Compute Engine. So the steps mentioned in this guide works on any cloud servers like AWS, DigitalOcean, Linode, Vultr or any VPS or Dedicated servers running Ubuntu 18.04.
Here is a brief guide to show you how to install and upgrade to PHP 7.4 on Ubuntu 18.04 LTS with Apache and PHP7.4-fpm with Nginx.
You can follow this guide to Upgrade to PHP 8
Add PPA for PHP 7.4
Add the ondrej/php which has PHP 7.4 package and other required PHP extensions.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Once you have added the PPA you can install PHP 7.4.
Install PHP 7.4 for Apache
Execute the following command to install PHP 7.4
sudo apt install php7.4
Install PHP 7.4 Extensions
Installing PHP extensions are simple with the following syntax.
sudo apt install php7.4-extension_name
Now, install some commonly used php-extensions with the following command.
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
After the installation has completed, you can confirm the installation using the following command
php -v
Enable PHP 7.4 for Apache
Now you need to tell Apache to use the installed version of PHP 7.4 by disabling the old PHP module (below I have mentioned php7.0, you need to use your current php version used by Apache) and enabling the new PHP module using the following command.
sudo a2dismod php7.0 sudo a2enmod php7.4
Restart Apache for the changes to take effect.
sudo service apache2 restart
Install PHP 7.4 FPM for Nginx
For Nginx you need to install FPM, execute the following command to install PHP 7.4 FPM
sudo apt install php7.4-fpm
Follow the same method above mentioned to install the extensions
After the installation has completed, confirm that PHP 7.4 FPM has installed correctly with this command
php-fpm7.4 -v
Modify Nginx configuration to use PHP 7.4
For Nginx you need to update the PHP-FPM socket in your Nginx configration located inside the sites-available directory. This will be located inside the location block location ~ .php$
Edit your configuration…
sudo nano /etc/nginx/sites-available/your.conf
The line you need to modify will look like this…
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
You need to replace the old PHP version with the new version.
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
Test your configration.
sudo nginx -t
Save the file and exit the editor and restart Nginx for the changes to take effect.
sudo service nginx restart
Configure PHP 7.4
Now we configure PHP for Web Applications by changing some values in php.ini file.
For PHP 7.4 with Apache the php.ini location will be in following directory.
sudo nano /etc/php/7.4/apache2/php.ini
For PHP 7.4 FPM with Nginx the php.ini location will be in following directory.
sudo nano /etc/php/7.4/fpm/php.ini
Hit F6 for search inside the editor and update the following values for better performance.
upload_max_filesize = 32M
post_max_size = 48M
memory_limit = 256M
max_execution_time = 600
max_input_vars = 3000
max_input_time = 1000
Once you have modified your PHP settings you need to restart your Apache for the changes to take effect.
Configure PHP 7.4 FPM Pools
PHP 7.4 FPM allows you to configure the user and group that the service will run under. You can modify these with these commands
sudo nano /etc/php/7.4/fpm/pool.d/www.conf
Change the following lines by replacing the www-data with your username.
user = username group = username listen.owner = username listen.group = username
Hit CTRL+X and Y to save the configuration and check if the configuration is correct and restart PHP.
Restart PHP 7.4 FPM
Once you have updated your PHP FPM settings you need to restart it to apply the changes.
sudo php-fpm7.4 -t sudo service php7.4-fpm restart
Prepare yourself for a role working as an Information Technology Professional with Linux operating system
Conclusion
Now you have learned how to upgrade PHP to PHP 7.4 on Ubuntu 18.04.
Thanks for your time. If you face any problem or any feedback, please leave a comment below.

Prev Post
Since this post shares cloud strategies with awesome people like you, naturally this post may contain affiliate links for products I use and love. If you click on those links and make a purchase, I’ll earn some coffee money which I drink while creating more helpful content like this.

Next Post
Since this post shares cloud strategies with awesome people like you, naturally this post may contain affiliate links for products I use and love. If you click on those links and make a purchase, I’ll earn some coffee money which I drink while creating more helpful content like this.
I can’t run PHP scripts on my localhost, the browser renders a white screen. If I view the source of the page I can see the contents of the PHP file visibly.
Using:
$ sudo apt-get install libapache2-mod-php7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php7.0 is already the newest version (7.0.6-6+donate.sury.org~xenial+1).
The following packages were automatically installed and are no longer required:
libgsoap8 libvncserver1
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 15 not to upgrade.
Suggests the module is installed. Upon trying to enable it:
$ sudo a2enmod php7.0
ERROR: Module php7.0 does not exist!
PHP is installed:
$ php -v
PHP 7.0.6-6+donate.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
I tried this tutorial https://ivan.reallusiondesign.com/install-php-7-on-ubuntu/
only when i reach
$ sudo a2enmod php7.0
ERROR: Module php7.0 does not exist!
I’m running out of ideas. If you could help me get PHP7 to run on Apache/2.4.18 (Ubuntu) that would be good thanks.
ERROR: Module mod-wsgi does not exist and other questions.
Why am I getting this error: ERROR: Module mod-wsgi does not exist!
$ sudo a2enmod mod-wsgiCode:
ERROR: Module mod-wsgi does not exist!$ sudo a2enmod mod_wsgi
Code:
ERROR: Module mod_wsgi does not exist!$ a2enmod
Code:
Which module(s) do you want to enable (wildcards ok)? mod* ERROR: No module found matching mod*!Here are the details of what’s installed and the contents of all the relevant files that I could think of:
$ locate mod_wsgi
Code:
/usr/lib/apache2/modules/mod_wsgi.so /usr/lib/apache2/modules/mod_wsgi.so-2.6Code:
Apache version: 2.2.14-5ubuntu8.2 Size: 6767 kbCode:
using Ubuntu 10.04 LTS - the Lucid Lynx - released in April 2010 and supported until April 2013Code:
python --version Python 2.6.5$ sudo service apache2 start
Code:
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName$ netstat -an | grep 80
Code:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN$ dpkg -l libapache2-mod-wsgi
Code:
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii libapache2-mod 2.8-2ubuntu1 Python WSGI adapter module for Apache$ cat /etc/apache2/mods-available/wsgi.load
Code:
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so$ apache2ctl -t -D DUMP_MODULES
Code:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName Loaded Modules: core_module (static) log_config_module (static) logio_module (static) mpm_worker_module (static) http_module (static) so_module (static) alias_module (shared) auth_basic_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgid_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) mime_module (shared) negotiation_module (shared) python_module (shared) reqtimeout_module (shared) setenvif_module (shared) status_module (shared) userdir_module (shared) wsgi_module (shared) Syntax OK/etc/apache2/mods-available/
Code:
-rw-r--r-- 1 root root 2953 2010-04-27 00:32 wsgi.conf -rw-r--r-- 1 root root 60 2010-04-27 00:32 wsgi.load/etc/apache2/mods-enabled/
Code:
lrwxrwxrwx 1 root root 27 2010-10-26 15:29 wsgi.conf -> ../mods-available/wsgi.conf lrwxrwxrwx 1 root root 27 2010-10-26 15:29 wsgi.load -> ../mods-available/wsgi.load$ dpkg -l libapache2-mod-wsgi
Code:
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii libapache2-mod 2.8-2ubuntu1 Python WSGI adapter module for Apache$ dpkg -s libapache2-mod-wsgi
Code:
Package: libapache2-mod-wsgi Status: install ok installed Priority: optional Section: httpd Installed-Size: 220 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: i386 Source: mod-wsgi Version: 2.8-2ubuntu1 Depends: apache2, apache2.2-common, libc6 (>= 2.4), libpython2.6 (>= 2.6), python (>= 2.6), python (<< 2.7) Suggests: apache2-mpm-worker | apache2-mpm-event Conffiles: /etc/apache2/mods-available/wsgi.load 06d2b4d2c95b28720f324bd650b7cbd6 /etc/apache2/mods-available/wsgi.conf 408487581dfe024e8475d2fbf993a15c Description: Python WSGI adapter module for Apache The mod_wsgi adapter is an Apache module that provides a WSGI (Web Server Gateway Interface, a standard interface between web server software and web applications written in Python) compliant interface for hosting Python based web applications within Apache. The adapter provides significantly better performance than using existing WSGI adapters for mod_python or CGI. Homepage: http://www.modwsgi.org/ Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>$ cat /var/log/apache2/error.log
Code:
[Sun Oct 24 10:02:29 2010] [notice] mod_python: Creating 8 session mutexes based on 3 max processes and 25 max threads. [Sun Oct 24 10:02:29 2010] [notice] mod_python: using mutex_directory /tmp [Sun Oct 24 10:02:29 2010] [notice] Apache/2.2.14 (Ubuntu) mod_python/3.3.1 Python/2.6.5 configured -- resuming normal operations [Tue Oct 26 15:29:29 2010] [notice] caught SIGTERM, shutting down [Tue Oct 26 15:29:30 2010] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. [Tue Oct 26 15:29:30 2010] [notice] mod_python: using mutex_directory /tmp [Tue Oct 26 15:29:30 2010] [notice] Apache/2.2.14 (Ubuntu) mod_python/3.3.1 Python/2.6.5 mod_wsgi/2.8 configured -- resuming normal operations [Tue Oct 26 16:22:40 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico [Tue Oct 26 16:22:43 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico [Wed Oct 27 06:47:07 2010] [notice] SIGUSR1 received. Doing graceful restart apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [Wed Oct 27 06:47:07 2010] [notice] mod_python: Creating 8 session mutexes based on 3 max processes and 25 max threads. [Wed Oct 27 06:47:07 2010] [notice] mod_python: using mutex_directory /tmp [Wed Oct 27 06:47:07 2010] [notice] Apache/2.2.14 (Ubuntu) mod_python/3.3.1 Python/2.6.5 mod_wsgi/2.8 configured -- resuming normal operations [Wed Oct 27 17:03:04 2010] [notice] caught SIGTERM, shutting down [Wed Oct 27 18:24:33 2010] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. [Wed Oct 27 18:24:33 2010] [notice] mod_python: using mutex_directory /tmp [Wed Oct 27 18:24:33 2010] [notice] Apache/2.2.14 (Ubuntu) mod_python/3.3.1 Python/2.6.5 mod_wsgi/2.8 configured -- resuming normal operations [Wed Oct 27 18:39:14 2010] [notice] caught SIGTERM, shutting down [Wed Oct 27 18:39:15 2010] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. [Wed Oct 27 18:39:15 2010] [notice] mod_python: using mutex_directory /tmp [Wed Oct 27 18:39:15 2010] [notice] Apache/2.2.14 (Ubuntu) mod_python/3.3.1 Python/2.6.5 mod_wsgi/2.8 configured -- resuming normal operations$ cat /etc/apache2/sites-available/default
Code:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews ExecCGI AddHandler cgi-script .cgi AddHandler wsgi-script .wsgi AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>$ cat /etc/apache2/mods-enabled/dir.conf
Code:
<IfModule mod_dir.c> DirectoryIndex index.html index.cgi index.pl index.code index.xhtml index.htm index.wsgi </IfModule>
Last edited by SpotTheWonderDog; October 28th, 2010 at 04:28 PM.
Reason: clarification
Re: ERROR: Module mod-wsgi does not exist and other questions.
Spot —
You may want to try the following:
Code:
sudo apt-get purge libapache2-mod-wsgi sudo apt-get install libapache2-mod-wsgiAs prescribed in the following article.
I cant install dev install on any lab. Not running on labs.
My problem start on lasb 2.1
This this my track lab
[email protected]:~$ sudo sudo apt-get update && sudo apt-get install git -y ——> OK!
[email protected]:~/devstack$ vi local.conf
[[local|localrc]]
HOST_IP=192.168.97.1
FLAT_INTERFACE=eth2
MULTI_HOST=1
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=openstack
MYSQL_PASSWORD=DB-secret
RABBIT_PASSWORD=MQ-secret
SERVICE_PASSWORD=SERVICE-secret
SERVICE_TOKEN=ALongStringUsuallyHere
enable_service rabbit mysql key
2017-10-31 19:36:23.182 | error: pathspec ‘stable/newton’ did not match any file(s) k
nown to git.
2017-10-31 19:36:23.188 | +functions-common:git_clone:1 exit_trap
2017-10-31 19:36:23.193 | +./stack.sh:exit_trap:494 local r=1
2017-10-31 19:36:23.204 | ++./stack.sh:exit_trap:495 jobs -p
2017-10-31 19:36:23.211 | +./stack.sh:exit_trap:495 jobs=
2017-10-31 19:36:23.216 | +./stack.sh:exit_trap:498 [[ -n » ]]
2017-10-31 19:36:23.222 | +./stack.sh:exit_trap:504 kill_spinner
2017-10-31 19:36:23.228 | +./stack.sh:kill_spinner:390 ‘[‘ ‘!’ -z » ‘]
‘
2017-10-31 19:36:23.233 | +./stack.sh:exit_trap:506 [[ 1 -ne 0 ]]
2017-10-31 19:36:23.239 | +./stack.sh:exit_trap:507 echo ‘Error on e
xit’
2017-10-31 19:36:23.239 | Error on exit
2017-10-31 19:36:23.245 | +./stack.sh:exit_trap:508 generate-subunit
1509478336 247 fail
2017-10-31 19:36:23.487 | +./stack.sh:exit_trap:509 [[ -z /opt/stack
/logs ]]
2017-10-31 19:36:23.496 | +./stack.sh:exit_trap:512 /home/ubuntu/dev
stack/tools/worlddump.py -d /opt/stack/logs
2017-10-31 19:36:24.010 | +./stack.sh:exit_trap:518 exit 1
……………
I dont know what this error i fallow the instructions i try with another branch (ocata, pike) and have a problems too.
Kind regards


