Right way to update meson?

I would like to install SwayWM on my Zorin 16 machine. To do that I need to compile wlroots and sway with meson and ninja. I ran into the problem that the version available through apt (0.53.2) is not the one required to perform the installation; 0.59.0 (or above) is.

What is the correct way to update to/install a newer version of meson in my case?

I have uninstalled the apt version, and reinstalled it with pip3

Through both these commands: pip3 install --user meson and sudo pip3 install meson

(I read I wouldn't be able to run sudo ninja commands if I did not install it with sudo pip3 as well)

I have added export PATH=$HOME/.local/bin:$PATH to my .profile but I still get errors like this when running ninja -C build:

/bin/sh: 1: /usr/bin/meson: not found
FAILED: build.ninja 

/usr/bin/meson --internal regenerate /home/user/.sway-build/wlroots /home/user/.sway-build/wlroots/build --backend ninja
ninja: error: rebuilding 'build.ninja': subcommand failed

meson was installed to ~/local/bin and /usr/local/bin on my machine. I think it is looking for meson in the wrong folder?

Am I doing something wrong? Pointers would be greatly appreciated.

BTW this is the procedure I am (trying to) following.

Have you tried moving the meson file from /usr/local/bin to /usr/bin?

No I have not, I was worried that could break things in the system. Although, it just dawned on me I could try to symlink it. Will try once I wake up and update it here. Thanks!

It is weird to me I have to do that though, given I installed it twice.


After installing meson you must go into ~/.bashrc and create a variable to the folder you installed it to. Something like:


Around the aliases is a pretty good place. Then you can install ninja or any other package you need and it will be recognized. I recommend checking the github, just search meson.

The only way to get a newer version is to install a newer version of python or build meson for your system.


I thought in Zorin we were supposed to use .profile instead. Pasting that in my .bashrc didn't take care of the problem.

Creating a symlink solved that issue though, thank you.

running ninja -C build returned a permission error, so I ran with it sudo. I get this error now:

Dependency wayland-server found: NO found 1.18.0 but need: '>=1.19'
Found CMake: /usr/bin/cmake (3.16.3)
Run-time dependency wayland-server found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency wayland-server

../meson.build:101:0: ERROR: Neither a subproject directory nor a wayland.wrap file was found.

I am guessing I must also update wayland-server to 1.19.0.
How would I do that? And are there drawbacks to doing this?
I wanna use Sway for reading, typing, browsing, etc. But still want to have access to Gnome on X11 and Wayland when necessary, would installing sway affect that somehow?

Thanks in advance.

I am sad to say that this sounds like a Rabbit-Hole.
Do you mind if I ask; Is installing the standard I3 tiling Window Manager instead of Sway an option?

Yes, if it is easier it definitely is an option.
I settled on Sway because it uses Wayland, and I wanted to start moving towards it.

I understand, but Wayland itself must be ready in order for users to move toward it.

1 Like

Also. Did you look for prepackaged and built versions? I ask because i was traveling a similar rabbit hole for tripwire till i stumbled across a repo with installation instructions in apt. Someone may have already traveled this rabbit hole and have posted a solution. Try a more diligent search for what you are looking for.

1 Like

Thanks for the reply. I believe I did, but I guess I can put more effort into it.
I ended up going with Aravisian's advice and installed i3 instead. If I end up finding someones' repo for it I may give it a try.

I try to avoid that as I don't know if I can trust some random repo. My paranoid self worries that the owner could just throw in a malicious version of a popular app (such as Firefox) with a greater version number, and wouldn't that just trick apt into updating it to the compromised version?

Is there any checking done by folks at https://launchpad.net/? can folks assume that if they are listed there they are "safe" or something?

I can answer this since;

The steps a person must go through to validate their identity and get a gpg fingerprint are vigorous.
Uploading packages to a repository require that digital fingerprint and that you digitally sign each and every package.
During this process, you must pass through lintian.
Once done, the launchpad server installs your software on a Virtual Machine and tests it. Any failure can result in that package being rejected.

I have had simple or small errors cause this rejection and you must go in and see what happened... And I am not alone in this. Most any repository holder deals with this. I have managed to not fail any builds for a while by being tedious, but ZorinGroup has had a slightly less lucky time:

You can imagine if that if the conscientious and professional ZorinGroup can still get some Failed Builds (0.02%), anyone can.
It is due to this rigorousness that many devs push for Flatpak or Snaps as that is less vigorous and far easier to upload to.

I can assure you that using a repository is Quite Safe. As soon as you connect to the internet and communicate with other servers, there is always an element of risk. But when that risk is far, far far lower than a Shark Attack when you live far inland; it simply is not worth worrying about.

1 Like

Amazing, this really puts an end to my worries. Gotta love Linux man! Thanks for this info!.

I really prefer apps from apt, but unfortunately some I use and need are not available there. In those situations I go with Flatpak, as I really dislike snaps.

Speaking of themes, are the Zorin themes available from flathub? I am having issues in i3 where all Flatpack apps have default Adwaita (as well as some in normal Zorin mode) and I have read that having themes installed from Flathub should fix most issues due to them being available in the sandbox. Are you guys aware of workarounds? Would it be a good idea to open an issue suggesting they be made available there if they are not?

Yes and they come preinstalled as flatpaks on Zorin OS.
@StarTreker has posted how to fix that... I cannot recall the fix off the top of my head since I do not use either Snap or Flatpak.
I can try searching his posts or see if he comes to the rescue responding to the @ sign above...

I couldn't find that under the topics he has created, could it be it was a reply to another's post?

Yes, I was searching too and just found one that mentions it (there are several):

Flatseal. Now I will try to remember it.

Yes, I have used Flatseal on the Zorin environment to grant apps permissions filesystem=home or filesystem=host (I am unsure which of the 2 is the best to use). That is what made most of them work with the Zorin theme.
That, unfortunately does not extend to i3. They all start up with the default Adwaita theme. I don't know if I am supposed to start some gnome daemon when logging in or if I must do something else.

I am sorry; my ignorance of Flatpak usage and workarounds is very apparent here.
It may be that the i3 window manager is what we need to look at.
Is it just the window borders that are in Adwaita, or the entire themed window?

When I created the tutorial, nobody took it seriously. This is very apparent by the responses I got, and I am still not OK with that, when everybody else's tutorials got likes and respect. This is part of why its hard to find, cause its buried in the forum from lack of views and respect I think.

But yes, Flatseal is how I did it guys.

Yes, I get it, Flatpack is not popular among some folks around here. But you know what, some people use Flatpack cause they have to. So Flatpack related issues are just as important as APT package related issues or whatever.

This is what they look. On the right is the Flatpak app. Left is not Flatpak, but I get some huge borders on some "system" apps Like gedit, Nautilus, Settings, etc.

I also get the impression that they are being pushed, by some, as eventual replacements for how apps are distributed in distros.

1 Like