Trying to build a package that requires meson to be > 0.47 -- current installed version in /usr/bin is 0.45.

While I can install with pip3 and it does indicate that it successfully installs 0.53.01 - nothing apt install, pip3, etc will upgrade to the new version. And I can't seem to move the new executable either.

What do I need to do to update meson? I've tried removing it and reinstalling, using pip3, etc.

Nothing seems to work -- this is a sticking point on this build. Thanks for any pointers in advance.

  • Also I tried this and meson is still listed as installed as an older version -- if anyone can help would be much appreciated: sudo -H pip3 install --target=/usr/bin --upgrade meson Collecting meson Installing collected packages: meson Successfully installed meson-0.53.1 $ meson --v 0.45.1 – GR99 Feb 23 '20 at 14:23

I upgraded meson from https://github.com/mesonbuild/meson.git and added it in front of my $PATH, but some scripts seem to use a hardcoded path to /usr/bin/meson, so that was not enough.

After the upgrade, I had the new version at ~/src/meson/meson.py which I copied to ~/src/meson/meson (without the .py extension).

Then, what fixed it for me was

my_meson=~/src/meson # <-- Adapt to the path of your wanted meson directory

export PATH=$my_meson:$PATH
echo 'export PATH='$my_meson':$PATH' >>~/.bashrc

sudo ln -si $my_meson/meson /usr/bin/meson

The essential part is the last line, which replaces the original symlink to point to the new version.


You can try updating your PATH var so that the new version is found first.

export PATH=$PATH:/home/youruser/.local/bin

After installing using pip3 install --user meson you need to reload your .profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.