2020/04/08

又是librenms的問題

/opt/librenms/daily.sh
出現

Fatal error: require(): Failed opening required '/opt/librenms/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/librenms/vendor/composer/autoload_real.php on line 69
PHP Fatal error:  require(): Failed opening required '/opt/librenms/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/librenms/vendor/composer/autoload_real.php on line 69

跑一下

/opt/librenms/validate.php

[FAIL]  Missing dependencies!
[FIX]:
/opt/librenms/scripts/composer_wrapper.php install --no-dev

執行 /opt/librenms/scripts/composer_wrapper.php install --no-dev

/opt/librenms/scripts/composer_wrapper.php install --no-dev
> LibreNMS\ComposerHelper::preInstall
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 3 installs, 38 updates, 0 removals
  - Installing symfony/polyfill-mbstring (v1.15.0): Downloading (100%)       
  - Updating symfony/polyfill-intl-idn (v1.12.0 => v1.15.0): Downloading (100%)       
  - Updating egulias/email-validator (2.1.11 => 2.1.17): Downloading (100%)       
  - Updating erusev/parsedown (1.7.3 => 1.7.4): Downloading (100%)       
  - Updating symfony/polyfill-ctype (v1.12.0 => v1.15.0): Downloading (100%)       
  - Updating phpoption/phpoption (1.5.2 => 1.7.3): Downloading (100%)       
  - Updating vlucas/phpdotenv (v3.6.0 => v3.6.2): Downloading (100%)       
  - Updating symfony/css-selector (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/var-dumper (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/routing (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/process (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/polyfill-php73 (v1.12.0 => v1.15.0): Downloading (100%)       
  - Updating symfony/mime (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/http-foundation (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/event-dispatcher (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating psr/log (1.1.2 => 1.1.3): Downloading (100%)       
  - Updating symfony/debug (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/error-handler (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/http-kernel (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/finder (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/console (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating symfony/polyfill-iconv (v1.12.0 => v1.15.0): Downloading (100%)       
  - Updating ramsey/uuid (3.8.0 => 3.9.3): Downloading (100%)       
  - Updating opis/closure (3.4.1 => 3.5.1): Downloading (100%)       
  - Updating symfony/translation (v4.4.0 => v4.4.7): Downloading (100%)       
  - Updating nesbot/carbon (2.27.0 => 2.32.2): Downloading (100%)       
  - Updating monolog/monolog (1.25.2 => 1.25.3): Downloading (100%)       
  - Updating league/flysystem (1.0.57 => 1.0.66): Downloading (100%)       
  - Updating laravel/framework (v5.8.35 => v5.8.37): Downloading (100%)       
  - Updating fico7489/laravel-pivot (3.0.3 => 3.0.4): Downloading (100%)       
  - Updating fideloper/proxy (4.2.1 => 4.3.0): Downloading (100%)       
  - Updating guzzlehttp/guzzle (6.4.1 => 6.5.2): Downloading (100%)       
  - Updating martinlindhe/laravel-vue-i18n-generator (0.1.42 => 0.1.46): Downloading (100%)       
  - Installing phpseclib/phpseclib (2.0.26): Downloading (100%)       
  - Updating php-amqplib/php-amqplib (v2.0.2 => v2.11.1): Downloading (100%)       
  - Updating phpmailer/phpmailer (v6.1.3 => v6.1.5): Downloading (100%)       
  - Removing dnoegel/php-xdg-base-dir (0.1)
  - Installing dnoegel/php-xdg-base-dir (v0.1.1): Downloading (100%)       
  - Updating psy/psysh (v0.9.9 => v0.9.12): Downloading (100%)       
  - Updating symfony/dotenv (v3.4.35 => v3.4.39): Downloading (100%)       
  - Updating symfony/yaml (v4.4.0 => v4.4.7): Downloading (100%)       
  - Installing doctrine/cache (1.10.0): Downloading (100%)       
Generating optimized autoload files
Deprecation Notice: Class HTMLPurifier_Language_en_x_test located in ./vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language/classes/en-x-test.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///opt/librenms/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crypt_CHAP_MD5 located in ./vendor/dapphp/radius/lib/Pear_CHAP.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///opt/librenms/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crypt_CHAP_MSv1 located in ./vendor/dapphp/radius/lib/Pear_CHAP.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///opt/librenms/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Crypt_CHAP_MSv2 located in ./vendor/dapphp/radius/lib/Pear_CHAP.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///opt/librenms/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: darkghosthunter/larapoke
Discovered Package: fideloper/proxy
Discovered Package: laravel/laravel
Discovered Package: laravel/tinker
Discovered Package: martinlindhe/laravel-vue-i18n-generator
Discovered Package: nesbot/carbon
Discovered Package: oriceon/toastr-5-laravel
Discovered Package: spatie/laravel-cors
Discovered Package: tightenco/ziggy
Package manifest generated successfully.
26 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> LibreNMS\ComposerHelper::postInstall
> Illuminate\Foundation\ComposerScripts::postInstall
> @php artisan vue-i18n:generate --multi-locales --format=umd

再跑一次 validate.php

[librenms@librenms ~]$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.62-28-g5f2eab0
DB Schema | 2020_03_25_165300_add_column_to_ports (161)
PHP       | 7.2.27
MySQL     | 5.5.64-MariaDB
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.10.1
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[FAIL]  Some folders have incorrect file permissions, this may cause issues.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/storage/framework/views/95a740c2fd790034ee55f5aee95726c8


chown -R librenms:librenms /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/


跑完後就ok了

沒有留言: