顯示具有 apt-mark 標籤的文章。 顯示所有文章
顯示具有 apt-mark 標籤的文章。 顯示所有文章

2026/08/09






librenms的php 官方建議要升到8.4以上了

比照之前記錄一下流程

列出之前 hold住的 package

apt-mark showhold

php-cli     php-curl  php-gd   php-json      php-mysql  php-snmp  php-zip php-common  php-fpm   php-gmp  php-mbstring  php-pear   php-xml


apt-mark unold php-cli     php-curl  php-gd   php-json      php-mysql  php-snmp  php-zip php-common  php-fpm   php-gmp  php-mbstring  php-pear   php-xml


移除先前版本

apt remove php8.3-zip php8.3-xml php8.3-snmp php8.3-readline php8.3-opcache php8.3-mysql php8.3-mbstring php8.3-gmp php8.3-common php8.3-curl php8.3-gd php8.3


安裝新版本

apt install php-cli     php-curl  php-gd   php-json      php-mysql  php-snmp  php-zip php-common  php-fpm   php-gmp  php-mbstring  php-pear   php-xml


設定timezone

/etc/php/8.4/cli/php.ini

date.timezone = Asia/Taipei


複制 /etc/php/8.3/fpm/pool.d/librenms.conf 到 /etc/php/8.4/fpm/pool.d


apt-mark hold

php-cli
php-common
php-curl
php-fpm
php-gd
php-gmp
php-json
php-mbstring
php-mysql
php-pear
php-snmp
php-xml
php-zip
php


重跑validate

出現







找了全部的檔案都沒找到這行

目前安裝的版本是 rrdtoold 1,7,2


最後找到是放在db裡

 select * from config where config_value like "%1.4.8%";
+-----------+-----------------+--------------+
| config_id | config_name     | config_value |
+-----------+-----------------+--------------+
|       820 | rrdtool_version | "1.4.8"      |
+-----------+-----------------+--------------+
1 row in set (0.001 sec)


直接update

MariaDB [librenms]>update config set config_value = '"1.5.5"' where config_id=820;
Query OK, 1 row affected (0.000 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [librenms]>
MariaDB [librenms]>
MariaDB [librenms]> select * from config where config_id=820;
+-----------+-----------------+--------------+
| config_id | config_name     | config_value |
+-----------+-----------------+--------------+
|       820 | rrdtool_version | "1.5.5"      |
+-----------+-----------------+--------------+
1 row in set (0.000 sec)

再跑validate就沒出現了

2024/11/04

今天把 librenms的php 升到 8.3 (官方建議)

記錄一下流程
先把之前 apt-mark hold 的pkg unhold

php-cli
php-common
php-curl
php-fpm
php-gd
php-gmp
php-json
php-mbstring
php-mysql
php-pear
php-snmp
php-xml
php-zip

接下來移除原安裝的 php 並安裝 php8.3


php8.3-fpm.service 要重啟並 enable

systemctl restart php8.3-fpm.service
systemctl enable php8.3-fpm.service


/etc/php/8.3/cli/php.ini裡的 timezone要設定

date.timezone = Asia/Taipei


複制 /etc/php/8.1/fpm/pool.d/librenms.conf 到 /etc/php/8.3/fpm/pool.d

把 pkg hold 住 暫時不再升版本

apt-mark hold

php-cli
php-common
php-curl
php-fpm
php-gd
php-gmp
php-json
php-mbstring
php-mysql
php-pear
php-snmp
php-xml
php-zip


目前正常了 再觀察看看

2022/12/20

今天更新 debian
直接下完
apt update
apt upgrade -y 後
librenms就打不開了
跑了 ./daily.sh 
出現

Updating to latest codebase                        OK
Updating Composer packages                         FAIL
> LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - fgrosse/phpasn1 is locked to version v2.4.0 and an update of this package was not requested.
    - fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 -> your php version (8.2.0) does not satisfy that requirement.
  Problem 2
    - fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 -> your php version (8.2.0) does not satisfy that requirement.
    - web-token/jwt-core v2.2.11 requires fgrosse/phpasn1 ^2.0 -> satisfiable by fgrosse/phpasn1[v2.4.0].
    - web-token/jwt-core is locked to version v2.2.11 and an update of this package was not requested.
Updated from ae22662c8 to 1ab238a4d                OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK

看來是php不能升到 8.2

只能倒回備分
再排除以下的更新 

php-cli/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-common/bullseye 2:93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:93+0~20221029.44+debian11~1.gbpaae3e9]
php-curl/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-fpm/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-gd/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-gmp/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-json/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-mbstring/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-mysql/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-pear/bullseye 1:1.10.13+submodules+notgz+2022032202-2+0~20221209.38+debian11~1.gbpfd4c1d all [upgradable from: 1:1.10.13+submodules+notgz+2022032202-2+0~20220330.37+debian11~1.gbpfd4c1d]
php-snmp/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-xml/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]
php-zip/bullseye 2:8.2+93+0~20221211.45+debian11~1.gbpdb4dcc all [upgradable from: 2:8.1+93+0~20221029.44+debian11~1.gbpaae3e9]

再來把以上的package hold住 不要更新
指令如下

Hold a package:

sudo apt-mark hold <package-name>
Remove the hold:

sudo apt-mark unhold <package-name>
Show all packages on hold:

sudo apt-mark showhold

指令下完後 apt upgrade 時就不會更新

不過如果是下 apt install 還是會更新 此時就不受 hold影響 要特別注意