Error: Missing dependencies! - Librenms

Hello guys,

I’ve just got this message when I try to access my Librenms:

Error: Missing dependencies! Run the following command to fix:
./scripts/composer_wrapper.php install --no-dev

Do I need just to run this command to fix this problem? or need something else.

Tks

Indeed you do

Tks laf for the prompt answer.,

is there a specific folder to run this command like: /opt/librenms/scripts ? or just run whatever locations I want?

From /opt/librenms as librenms user.

Hi Lard,

I tried to run the following command and the system didn’t recoganize the argument --no-dev as shows bellow::

[root@localhost librenms]# runuser -l librenms -c ./scripts/composer_wrapper.php install --no-dev
runuser: unrecognized option ‘–no-dev’

Do you know if is this line is correct ?

Tks for your reply.

I Just saw the post here from manyhats081d, I’ll try his procedure:

manyhats081d
I tried the:
./opt/librenms/scripts/composer_wrapper.php install --no-dev

it failed. So I did the yum update since it was my chance to catch up, rebooted, ran the command again. I got the ext-mbstring error listed by others above. I did yum install php70w-mbstring and rebooted. Now it works.

Thanks to everyone above for the help. much love for you all

Hi,

iI fllowed this procedure and now the mbstring is ok, however I got another problem qhen I try to access the webui:

Error: bootstrap/cache, storage, storage/framework/sessions, storage/framework/views, storage/framework/cache not writable! Run these commands as root on your LibreNMS server to fix:
chown -R librenms:librenms /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

setfacl -R -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

I Run these command and I still get the error, any ideas?

look what I did:

[root@localhost librenms]# chown -R librenms:librenms /opt/librenms/bootstrap/cache
[root@localhost librenms]# chown -R librenms:librenms /opt/librenms/storage
[root@localhost librenms]# chown -R librenms:librenms /opt/librenms/storage/framework/sessions
[root@localhost librenms]# chown -R librenms:librenms /opt/librenms/storage/framework/views
[root@localhost librenms]# chown -R librenms:librenms /opt/librenms/storage/framework/cache
[root@localhost librenms]# setfacl -R -m g::rwx /opt/librenms/bootstrap/cache
[root@localhost librenms]# setfacl -R -m g::rwx /opt/librenms/storage
[root@localhost librenms]# setfacl -R -m g::rwx /opt/librenms/storage/framework/sessions
[root@localhost librenms]# setfacl -R -m g::rwx /opt/librenms/storage/framework/views
[root@localhost librenms]# setfacl -R -m g::rwx /opt/librenms/storage/framework/cache
[root@localhost librenms]# setfacl -d -m g::rwx /opt/librenms/bootstrap/cache
[root@localhost librenms]# setfacl -d -m g::rwx /opt/librenms/storage
[root@localhost librenms]# setfacl -d -m g::rwx /opt/librenms/storage/framework/sessions
[root@localhost librenms]# setfacl -d -m g::rwx /opt/librenms/storage/framework/views
[root@localhost librenms]# setfacl -d -m g::rwx /opt/librenms/storage/framework/cache

I might recommend you run “validate.php” to double check.

I did already:

[root@localhost librenms]# ./validate.php

Component Version
LibreNMS 1.39-41-g824ce31
DB Schema 249
PHP 7.0.29
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

but still getting the message.

I always su librenms before running validate - you might try that.

its really strange, I just ran that now and nothin happen:

[root@localhost ~]# su librenms
bash-4.2$ cd /opt/librenms/
bash-4.2$ ./validate.php

Component Version
LibreNMS 1.39-41-g824ce31
DB Schema 249
PHP 7.0.29
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Any other idea?

Restart the web server/php-fpm?

How can I do that? systemctl restart php-fpm?

I rebooted the server also.

Tks Laf

What actual error are you getting?

Sorry for the delay, I was out of office today, here it is:

Error: bootstrap/cache, storage, storage/framework/sessions, storage/framework/views, storage/framework/cache not writable! Run these commands as root on your LibreNMS server to fix:

chown -R librenms:librenms /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

setfacl -R -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/storage/framework/sessions /opt/librenms/storage/framework/views /opt/librenms/storage/framework/cache

If using SELinux you may also need:

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/bootstrap/cache(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/bootstrap/cache(/.*)?’

restorecon -RFvv /opt/librenms/bootstrap/cache

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage(/.*)?’

restorecon -RFvv /opt/librenms/storage

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage/framework/sessions(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage/framework/sessions(/.*)?’

restorecon -RFvv /opt/librenms/storage/framework/sessions

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage/framework/views(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage/framework/views(/.*)?’

restorecon -RFvv /opt/librenms/storage/framework/views

semanage fcontext -a -t httpd_sys_content_t ‘/opt/librenms/storage/framework/cache(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/opt/librenms/storage/framework/cache(/.*)?’

restorecon -RFvv /opt/librenms/storage/framework/cache

tks one more time laf to reply.

Have you ran those commands?

I ran just the first ones, the others regarding to SELinux not, because I am using Centos7. Should I run these ones as well? because the message told us just to run if you are using SELinux.

Tks

I would double check and run “sestatus” in your terminal. it can come as part of a centos 7 installation

hum, great, tks for the clue, I didn’t know that, now I’ll run those commands here. Tks Chas.