Matrix-synapse fails to update

Creating a bug report/issue

Required Information

  • DietPi version:


Kernel version:

Linux 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux

  • SBC model: RPi 4


I’ve been running a synapse server for ~6 months now, and it’s been pretty much smooth sailing. But today when I tried to upgrade matrix-synapse from 1.67 to 1.68 with “pip3 install -U matrix-synapse” I ran into an error: “ModuleNotFoundError: No module named ‘setuptools’”
so setuptools has been uninstalled at some point I guess? I installed it again with pip, and now I get “error: can’t find Rust compiler” (when building wheel for matrix-synapse)

I tried reinstalling with “dietpi-software reinstall 125” but it results in the same error…

I don’t know how I would proceed. I tried installing Rust with rustup but that didn’t help. Between last update and this update I have only installed and uninstalled dietpi-dashboard and webmin (just trying them out) and installed (and kept) netdata. Otherwise I haven’t fiddled around (at least I think)

Any suggestions where I could look into?

uhhh that’s extremely bad that it requires rust to compile matrix-synapse now :frowning:

We would need to adjust our install procedure complete to include rust.

Yeah I found out from here that it indeed requires rust from now on, however they state that installing with pip should not be affected: Upgrading between Synapse Versions - Synapse

Seems not to be true anymore. Or at least not for the moment.

Can you try following

curl -sSfL '' -o
chmod +x
./ -y --profile minimal
. /root/.cargo/env
dietpi-software reinstall 125
rustup self uninstall -y

Unofrtunately it seems pip is still unable to find Rust compiler. So same error. :confused:

login as root user

curl -sSfL '' -o
chmod +x
./ -y --profile minimal
. /root/.cargo/env

does following return a version??

rustc -V

Yes it does: rustc 1.64.0 (a55dd71d5 2022-09-19)

ok let’s try following

# login as user root
curl -sSfL '' -o
chmod +x
./ -y --profile minimal
. /root/.cargo/env
pip3 install --no-cache-dir -U matrix-synapse psycopg2
dietpi-software reinstall 125
rustup self uninstall -y

The Rust binaries need to be loaded into PATH within the script. Indeed installing the module manually first should work as well.

I hope the install does not take ages and consumes tons of RAM now… Else we need to provide pre-compiled wheels ourselves or so :smile:.

I tested it using my GitHub PR on a R5S without issues. Installation was done in a couple of minutes. However, it would require at least 2GB ram due to the Rust installation done inside /tmp. Not the same drama as we had on Vaultwarden :roll_eyes:

Thank you, this worked!

So I should probably use this method for now I guess?

Usually there is no needed for as we think on a solution for next release.

In parallel we ask piwheels and matrix-org to provide precompiled python wheels. This would be best as we don’t need to implement rust.

1 Like

To add as info: I did not see any obscene RAM usage, and the install took maybe 7-10 minutes.

I’m running DietPi on RPi 4 2G model and I had about 1-0,5G available RAM for the whole install process.

The thing is, if we would install rust, we would store it on a tmpfs inside. Means the rust installation would be located in memory. Therefore, we need to ensure to have enough ram available. Especially on smaller SBC like RP2 or 3 :wink:

1 Like

Or we implement a persistent Rust install option to use. It’s anyway on the wish list somewhere. But with some luck the pre-compiled matrix-synapse wheels are implemented before our next release, at least replies are promising.

yeah we could do that, maybe for user root as this is the one we use to install our software title??

Hi guys, the matrix-synapse is not working for me. Is it working for somebody right now?
I also tried steps mentioned above, but still getting errors while installing.




pls open a new post within troubleshooting section if you have issues with installation. There you can post error messages you receive and further system details.