升级失败 - 无法重新安装

我试图从一个失败的升级中恢复,但之前发生的磁盘问题导致容器崩溃。现在,当我尝试运行 ./discourse-doctor 或 ./launcher rebuild..,甚至进行全新安装时,都会在此处失败。看起来可能是容器镜像存在问题?

2.0.20260915-0028: Pulling from discourse/base
Digest: sha256:5028d077b061225507e7093fda1ff5bdc64d483b5c0397776f9a52c50008cd9b
Status: Downloaded newer image for discourse/base:2.0.20260915-0028
docker.io/discourse/base:2.0.20260915-0028
Ensuring launcher is up to date
Launcher is up-to-date
2.0.20260915-0028: Pulling from discourse/base
Digest: sha256:5028d077b061225507e7093fda1ff5bdc64d483b5c0397776f9a52c50008cd9b
Status: Image is up to date for discourse/base:2.0.20260915-0028
docker.io/discourse/base:2.0.20260915-0028
/usr/local/lib/ruby/3.4.0/rubygems/basic_specification.rb:42:in 'singleton class': uninitialized constant Gem::Deprecate (NameError)
        from /usr/local/lib/ruby/3.4.0/rubygems/basic_specification.rb:41:in '<class:BasicSpecification>'
        from /usr/local/lib/ruby/3.4.0/rubygems/basic_specification.rb:7:in '<top (required)>'
        from /usr/local/lib/ruby/3.4.0/rubygems/specification.rb:11:in 'Kernel#require_relative'
        from /usr/local/lib/ruby/3.4.0/rubygems/specification.rb:11:in '<top (required)>'
        from /usr/local/lib/ruby/3.4.0/rubygems.rb:1372:in 'Kernel#require_relative'
        from /usr/local/lib/ruby/3.4.0/rubygems.rb:1372:in '<top (required)>'
        from <internal:gem_prelude>:2:in 'Kernel#require'
        from <internal:gem_prelude>:2:in '<internal:gem_prelude>'
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
git: error while loading shared libraries: /lib/x86_64-linux-gnu/libpcre2-8.so.0: file too short
bootstrap failed with exit code 127
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
078e7b891ce7ebf3454c59f2c0ab346d023d16539b4d8b4b33bf268f5109753b

你好 @embusa,感谢你的联系。

我已经查看了该错误。问题似乎出在主机/Docker 环境层面,而非 Discourse 应用本身。关键错误是 libpcre2-8.so.0: file too short,这强烈表明在磁盘问题发生后,系统库文件已损坏。

哦!考虑到磁盘问题,这就说得通了——我之前以为是容器那边的问题。让我在一个新系统上试试。我盯着它看太久了,都没意识到这一点。我一直在关注开头的那个 Ruby 错误。

是的,没错。Ruby 错误只是个干扰项(libpcre2 错误指向的是磁盘/系统问题)。在一个干净的系统上测试应该能很快确认这一点。

后续讨论请私信。谢谢

我会尝试

cd /var/discourse
./launcher cleanup
docker image rm discourse/base:2.0.20260915-0028
./launcher rebuild app

你为什么要感谢他们?