Update meson on Ubuntu 18.04.4 LTS -- force update

16,779

Solution 1

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

Solution 2

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.

Share:
16,779

Related videos on Youtube

GR99
Author by

GR99

Updated on September 18, 2022

Comments

  • GR99
    GR99 over 1 year

    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.

  • Barmaley
    Barmaley almost 3 years
    That worked! Had to remove it first with apt-get like so sudo apt-get remove meson
  • matanster
    matanster over 2 years
    Sometimes it may be cleaner to simply run the version of meson installed to your python environment, without affecting your systemwide installation. Just use whereis meson to locate and run it.