Apache 2 installed but not starting in ubuntu 18.04

I have installed apache on ubuntu 18.04 but when I try to start it I am getting : apache2: error while loading shared libraries: libapr-1.so.0: cannot open shared object file: No such file or directory

martin@martin:~$ sudo ufw app list
Available applications:
  Apache
  Apache Full
  Apache Secure
  CUPS
  OpenSSH
martin@martin:~$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Apache Full                ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
22                         ALLOW       Anywhere                  
Apache Full (v6)           ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6)             
22 (v6)                    ALLOW       Anywhere (v6)             

martin@martin:~$ apache2 -version
apache2: error while loading shared libraries: libapr-1.so.0: cannot open shared object file: No such file or directory
martin@martin:~$ 

What seem to be causing the problem

EDIT

martin@martin:~$ sudo apt-get install libapr1 libapr1-dev 
[sudo] password for martin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libapr1 is already the newest version (1.6.3-2).
libapr1-dev is already the newest version (1.6.3-2).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
martin@martin:~$ sudo apt-get install libapr-1.so.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libapr-1.so.0
E: Couldn't find any package by glob 'libapr-1.so.0'
E: Couldn't find any package by regex 'libapr-1.so.0'
martin@martin:~$ 

UPDATE:

martin@martin:~$ ls -l /usr/lib/x86_64-linux-gnu/libapr-1*
-rw-r--r-- 1 root root 394910 Feb 25  2018 /usr/lib/x86_64-linux-gnu/libapr-1.a
-rw-r--r-- 1 root root    958 Feb 25  2018 /usr/lib/x86_64-linux-gnu/libapr-1.la
lrwxrwxrwx 1 root root     17 Feb 25  2018 /usr/lib/x86_64-linux-gnu/libapr-1.so -> libapr-1.so.0.6.3

martin@martin:~$ ldd /usr/sbin/apache2
    linux-vdso.so.1 (0x00007fff8e0f3000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f8948139000)
    libaprutil-1.so.0 => /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0 (0x00007f8947f0e000)
    libapr-1.so.0 => not found
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8947cef000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f89478fe000)
    libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f89476c6000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f8947494000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8948651000)
    libapr-1.so.0 => not found
0
задан 11 June 2020 в 07:27

1 ответ

Эта проблема, вероятно, была решена, но вы были вероятно отсутствует пакет libaprutil1: библиотека Apache Portable Runtime. Для операционных систем на основе Debian, таких как Ubuntu, запустите:
сначала попробуйте настроить динамические привязки компоновщика во время выполнения

ldconfig

Если это не решит вашу проблему, попробуйте переустановить libaprutil1

sudo apt-get install --reinstall libaprutil1

0
ответ дан 19 June 2020 в 21:27

Другие вопросы по тегам:

Похожие вопросы: