mastodon (2) matrix (1) 加密 (3) 境内卡 (1) China travel (12) Foreign bank card (13) International travel (6) 工作 (2) Trip (18) dedicated server (8) Life (6)

Issues Encountered When Updating MASTODON to V4.2.5

Due to Mastodon fixing a critical security update,"for operational safety, I also just attempted to update the currently running Mastodon version from v4.2 to v4.2.5.

My system environment is Ubuntu 20.04.6 LTS. Following the upgrade guide, I updated Ruby to 3.2.3, and encountered an error during the final precompilation step.

cannot allocate memory in static TLS block – /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack/msgpack.so (LoadError)

The issue was causing the upgrade to be unable to proceed. After researching some information, I found that the same problem also occurred in Debian 11. I resolved this issue with the following command.

echo /usr/lib/x86_64-linux-gnu/libjemalloc.so > /etc/ld.so.preload

You can also try two other potentially effective fixes.

export LD_PRELOAD=/path/to/libjemalloc.so.2
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEN