Debian12软件包方式安装失败,疑似apt软件源文件不匹配

【 使用环境 】 测试环境
【 OB or 其他组件 】
【 使用版本 】latest
【问题描述】
Debian 12,按照 OceanBase 社区版 快速上手文档 使用方式二软件包方式一键安装脚本出错。关键错误信息如下

W: http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64/./InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Failed to fetch http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64/./Packages.gz  File has unexpected size (18705 != 15723). Mirror sync in progress? [IP: 119.167.185.91 80]
   Hashes of expected file:
    - Filesize:15723 [weak]
    - SHA512:f46e5a8a01a0e3719a1e4d04bbed72f4cc9d1141f34438152ac7e9a243336e770621d458d4ed8d8f7a18b2197cd2f1f6097c2a03638bba3d6f4bc101ff891592
    - SHA256:c6e87d8450579cb3e48afda3d36f7716c0b590e554880b4dead4bdeedce516e6
    - SHA1:88fba71835d209ff39ff36707cbe00431829b1f9 [weak]
    - MD5Sum:49b771e73d537968cb5d82109cef9689 [weak]
   Release file created at: Mon, 16 Dec 2024 11:12:04 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

【复现路径】

  1. 使用Debian12 Cloud Image创建KVM虚拟机
  2. 使用可免密sudo的普通用户执行 sudo bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/service/installer.sh)"
  3. 运行结果如下
debian@test-oceanbase-01:~$ sudo bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/service/installer.sh)"
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [51 B]
Get:3 file:/etc/apt/mirrors/debian-security.list Mirrorlist [60 B]
Get:7 http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64 ./ InRelease [1743 B]
Get:8 http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64 ./ Packages [15.7 kB]
Err:8 http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64 ./ Packages
  File has unexpected size (18705 != 15723). Mirror sync in progress? [IP: 119.167.185.90 80]
  Hashes of expected file:
   - Filesize:15723 [weak]
   - SHA512:f46e5a8a01a0e3719a1e4d04bbed72f4cc9d1141f34438152ac7e9a243336e770621d458d4ed8d8f7a18b2197cd2f1f6097c2a03638bba3d6f4bc101ff891592
   - SHA256:c6e87d8450579cb3e48afda3d36f7716c0b590e554880b4dead4bdeedce516e6
   - SHA1:88fba71835d209ff39ff36707cbe00431829b1f9 [weak]
   - MD5Sum:49b771e73d537968cb5d82109cef9689 [weak]
  Release file created at: Mon, 16 Dec 2024 11:12:04 +0000
Hit:2 https://[REDACTED]/debian-trixie-proxy bookworm InRelease
Hit:4 https://[REDACTED]/debian-trixie-proxy bookworm-updates InRelease
Hit:5 https://[REDACTED]/debian-trixie-proxy bookworm-backports InRelease
Hit:6 https://[REDACTED]/debian-trixie-security-proxy bookworm-security InRelease
Reading package lists... Done
W: http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64/./InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Failed to fetch http://mirrors.oceanbase.com/oceanbase/community/stable/debian/bookworm/amd64/./Packages.gz  File has unexpected size (18705 != 15723). Mirror sync in progress? [IP: 119.167.185.90 80]
   Hashes of expected file:
    - Filesize:15723 [weak]
    - SHA512:f46e5a8a01a0e3719a1e4d04bbed72f4cc9d1141f34438152ac7e9a243336e770621d458d4ed8d8f7a18b2197cd2f1f6097c2a03638bba3d6f4bc101ff891592
    - SHA256:c6e87d8450579cb3e48afda3d36f7716c0b590e554880b4dead4bdeedce516e6
    - SHA1:88fba71835d209ff39ff36707cbe00431829b1f9 [weak]
    - MD5Sum:49b771e73d537968cb5d82109cef9689 [weak]
   Release file created at: Mon, 16 Dec 2024 11:12:04 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
installer: command failed: apt update

【附件及日志】

Linux环境信息:

debian@test-oceanbase-01:~$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
debian@test-oceanbase-01:~$ uname -a
Linux test-oceanbase-01 6.1.0-38-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64 GNU/Linux

【备注】基于 LLM 和开源文档 RAG 的论坛小助手已开放测试,在发帖时输入 [@论坛小助手] 即可召唤小助手,欢迎试用!

@论坛小助手

1 个赞

换另一种方法试试呢

1 个赞

我觉得应该转发给管理oceanbase apt包的工作人员看看,Index of /community/stable/debian/bookworm/amd64/ 这里的文件日期大部分是2025.2月,距今约7个月,如果软件包一直长时间不可用或已经放弃维护,是否应该在文档,尤其是上手文档中删除这一部分(即方法二)?

1 个赞

已反馈 请稍等

1 个赞

请问是否有进展?刚才重试了一次依然报相同的错误

1 个赞

换个低版本的包试试

1 个赞

请问如何指定低版本?
我是通过
https://open.oceanbase.com/quickStart
快速上手文档中的一键脚本安装的,并没有看到有指定版本号参数或指引

sudo bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/service/installer.sh)"
1 个赞

稍等,镜像云应该是缺少包,你可以先尝试使用obd的离线模式部署下。
https://www.oceanbase.com/docs/common-obd-cn-1000000003892241

1 个赞

换别的方法啊.

1 个赞

坐等

1 个赞

使用方法一,通过obd部署到当前用户有另外的问题。

据我观察是由于obd部署方式相较于软件包方式没有使用systemd服务,因此需要修改当前用户或SSH会话的limits,但由于obd的修改方式似乎是没有生效,怀疑是obd没有对cloud image做兼容。

运行obd prefobd cluster init4env pref 的主要报错信息如下,如需详细log请告诉我:

debian@test-oceanbase-01:~$ obd pref
Get local repositories ok
Open ssh connection ok
Get deployment connections ok
Get standbys info ok
Cluster status check ok
oceanbase-ce work dir cleaning ok
obproxy-ce work dir cleaning ok
obagent work dir cleaning ok
prometheus work dir cleaning ok
grafana work dir cleaning ok
pref destroyed
Cluster param config check ok
Open ssh connection ok
Generate grafana configuration ok
Scenario not specified, please specify the scenario you want.
1. express_oltp
2. complex_oltp
3. olap
4. htap (default)
5. kv
Please input the scenario [default: 4]: 
Generate prometheus configuration ok
Generate obproxy configuration ok
Generate obagent configuration ok
+--------------------------------------------------------------------------------------------+
|                                          Packages                                          |
+--------------+---------+------------------------+------------------------------------------+
| Repository   | Version | Release                | Md5                                      |
+--------------+---------+------------------------+------------------------------------------+
| grafana      | 7.5.17  | 1                      | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| oceanbase-ce | 4.3.5.3 | 103010012025090210.el7 | 01caa84d50b07cc5d09d3a34be2d543dd72e708f |
| prometheus   | 2.37.1  | 10000102022110211.el7  | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
| obproxy-ce   | 4.3.5.0 | 3.el7                  | f17b277b681adb1c86bfc3cfda369ad88896da9d |
| obagent      | 4.2.2   | 100000042024011120.el7 | 19739a07a12eab736aff86ecf357b1ae660b554e |
+--------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Load param plugin ok
Open ssh connection ok
Initializes obagent work home ok
Initializes observer work home ok
Initializes obproxy work home ok
Initializes prometheus work home ok
Initializes grafana work home ok
Parameter check ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository install ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository lib check ok
Remote oceanbase-ce-4.3.5.3-103010012025090210.el7-01caa84d50b07cc5d09d3a34be2d543dd72e708f repository install ok
Remote oceanbase-ce-4.3.5.3-103010012025090210.el7-01caa84d50b07cc5d09d3a34be2d543dd72e708f repository lib check !!
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository install ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository lib check ok
Remote obproxy-ce-4.3.5.0-3.el7-f17b277b681adb1c86bfc3cfda369ad88896da9d repository install ok
Remote obproxy-ce-4.3.5.0-3.el7-f17b277b681adb1c86bfc3cfda369ad88896da9d repository lib check ok
Remote obagent-4.2.2-100000042024011120.el7-19739a07a12eab736aff86ecf357b1ae660b554e repository install ok
Remote obagent-4.2.2-100000042024011120.el7-19739a07a12eab736aff86ecf357b1ae660b554e repository lib check ok
Try to get lib-repository
Remote oceanbase-ce-libs-4.3.5.3-103010012025090210.el7-11147b54e0600924ae61f107cf16134ba3f760d6 repository install ok
Remote oceanbase-ce-4.3.5.3-103010012025090210.el7-01caa84d50b07cc5d09d3a34be2d543dd72e708f repository lib check ok
pref deployed
Get local repositories ok
Load cluster param plugin ok
Open ssh connection ok
[WARN] OBD-1011: (127.0.0.1) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536)
[ERROR] OBD-1007: (127.0.0.1) The value of the ulimit parameter "open files" must not be less than 20000 (Current value: 1024), Please execute `echo -e "* soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf` as root in 127.0.0.1. if it dosen't work, please check whether UsePAM is yes in /etc/ssh/sshd_config.
[ERROR] OBD-1007: (127.0.0.1) The value of the ulimit parameter "max user processes" must not be less than 4096 (Current value: 3164), Please execute `echo -e "* soft nproc 4096\n* hard nproc 4096" >> /etc/security/limits.d/nproc.conf` as root in 127.0.0.1. if it dosen't work, please check whether UsePAM is yes in /etc/ssh/sshd_config.
[WARN] OBD-1007: (127.0.0.1) The recommended number of core file size is unlimited (Current value: 0)
[WARN] OBD-1007: (127.0.0.1) The recommended number of stack size is unlimited (Current value: 8192)
[WARN] OBD-1012: (127.0.0.1) clog and data use the same disk (/)
You can use the `obd cluster init4env pref` command to automatically configure system parameters
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 57565f22-8ebe-11f0-9dfb-bc24115ceb4b
If you want to view detailed obd logs, please run: obd display-trace 57565f22-8ebe-11f0-9dfb-bc24115ceb4b
debian@test-oceanbase-01:~$ obd cluster init4env pref
Get local repositories ok
Open ssh connection ok
get system config x
[ERROR] OBD-1016: (127.0.0.1) failed to get kernel parameter  using command "sysctl -a"

See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 9ff3873c-8ebe-11f0-b39d-bc24115ceb4b
If you want to view detailed obd logs, please run: obd display-trace 9ff3873c-8ebe-11f0-b39d-bc24115ceb4b

error报错有提示参数有问题,执行下下面的命令
echo -e “* soft nproc 4096\n* hard nproc 4096” >> /etc/security/limits.d/nproc.conf`

已经这样操作过了,但是似乎不能正确生效,疑似是Cloud Image特性导致。

debian@test-oceanbase-01:~$ find /etc/security/limits.d/ -type f -print -exec cat {} \;
/etc/security/limits.d/nproc.conf
* soft nproc 4096
* hard nproc 4096
/etc/security/limits.d/stack.conf
* soft stack unlimited
* hard stack unlimited
/etc/security/limits.d/nofile.conf
* soft nofile 20000
* hard nofile 20000
/etc/security/limits.d/core.conf
* soft core unlimited
* hard core unlimited
debian@test-oceanbase-01:~$ grep UsePAM /etc/ssh/sshd_config
UsePAM yes
debian@test-oceanbase-01:~$ sudo systemctl restart sshd
debian@test-oceanbase-01:~$ ulimit -n ; ulimit -u ; ulimit -c ; ulimit -s ;
1024
3164
0
8192
debian@test-oceanbase-01:~$ exit
logout
SSH connection has been disconnected. 
Reconnecting...
Last login: Thu Sep 11 16:22:57 2025  
debian@test-oceanbase-01:~$ cd /home/debian
debian@test-oceanbase-01:~$ ulimit -n ; ulimit -u ; ulimit -c ; ulimit -s ;
1024
3164
0
8192
debian@test-oceanbase-01:~$