Ubuntu on Window and Hugo 0.105.0 via Brew: info[DT_RUNPATH] == NULL' failed! ... /bin/hugo: Bad address

Hi,
On one of my computers, I am using Ubuntu on Windows via Windows Subsystem for Linux.

I just updated Hugo from 0.104.3 to 0.105.0 and it stop working.
When trying to do hugo serve got following error

-bash: /home/linuxbrew/.linuxbrew/bin/hugo: Bad address

When trying to check hugo version got the following:

Inconsistency detected by ld.so: ./get-dynamic-info.h: 118: elf_get_dynamic_info: Assertion `info[DT_RUNPATH] == NULL' failed!

I removed brew with all packages and folders and reinstalled from the scratch but still got that same issue.

Here is full log:

dw@Computer90:~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/var
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var/homebrew
/home/linuxbrew/.linuxbrew/var/homebrew/linked
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/Caskroom
/home/linuxbrew/.linuxbrew/Frameworks

Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/bin/install -d -o dw -g dw -m 0755 /home/linuxbrew/.linuxbrew
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chmod ug=rwx /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chmod go-w /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> /usr/bin/sudo /bin/chown dw /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chgrp dw /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/chown -R dw:dw /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 220304, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 220304 (delta 0), reused 45 (delta 0), pack-reused 220259
Receiving objects: 100% (220304/220304), 62.33 MiB | 8.06 MiB/s, done.
Resolving deltas: 100% (162066/162066), done.
From https://github.com/Homebrew/brew
 * [new branch]      dependabot/bundler/Library/Homebrew/rubocop-1.38.0 -> origin/dependabot/bundler/Library/Homebrew/rubocop-1.38.0
 * [new branch]      less-agressive-core-tap -> origin/less-agressive-core-tap
 * [new branch]      master                  -> origin/master

Updating files: 100% (2930/2930), done.
HEAD is now at b7391069d Merge pull request #14138 from danielbayley/cmd-install-dry-run
==> Tapping homebrew/core
remote: Enumerating objects: 1332422, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 1332422 (delta 52), reused 59 (delta 31), pack-reused 1332329
Receiving objects: 100% (1332422/1332422), 509.15 MiB | 2.40 MiB/s, done.
Resolving deltas: 100% (924494/924494), done.
From https://github.com/Homebrew/homebrew-core
 * [new branch]      master     -> origin/master
Updating files: 100% (6699/6699), done.
HEAD is now at a5f1cbe608c libxml2: update 2.10.3_1 bottle.
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:fc45ee6eddf4c7a17f4373dde7b1bc8a58255ea61e6847d3bf895225b28d072a
######################################################################## 100.0%
==> Pouring portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz
Updated 1 tap (homebrew/core).
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Install Homebrew's dependencies if you have sudo access:
    sudo apt-get install build-essential
  For more information, see:
    https://docs.brew.sh/Homebrew-on-Linux
- We recommend that you install GCC:
    brew install gcc
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

dw@Computer90:~$ brew install hugo
Running `brew update --auto-update`...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).

==> Downloading https://ghcr.io/v2/homebrew/core/linux-headers/5.15/manifests/5.15.57-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/linux-headers/5.15/blobs/sha256:8692682830cbb1fb74bb61190b644da9de0f4c3==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:8692682830cbb1fb74bb61190b644da9de0######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/glibc/manifests/2.35_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/glibc/blobs/sha256:274dd06ae6ecaee3025d6bf21cf4c7641df9a1cc3973e162911a==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:274dd06ae6ecaee3025d6bf21cf4c7641df######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gmp/manifests/6.2.1_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gmp/blobs/sha256:786ae29f0c0b06ea86e42bd9c6ac2c49bd5757da037dead7053e8b==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:786ae29f0c0b06ea86e42bd9c6ac2c49bd5######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/isl/manifests/0.25
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/isl/blobs/sha256:c0244c95ed9cc89b826868de83bec3150fcc120add126501717677==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c0244c95ed9cc89b826868de83bec3150fc######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpfr/manifests/4.1.0-p13
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpfr/blobs/sha256:345a3d99db0f4149f84f0aa16c0ee9c4275f695e4fa0f6d2ae1e8==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:345a3d99db0f4149f84f0aa16c0ee9c4275######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libmpc/manifests/1.2.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libmpc/blobs/sha256:d74eb5f1377d8fa72fad88baca1bd5f00c29d45ba186fbec89a==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d74eb5f1377d8fa72fad88baca1bd5f00c2######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/lz4/manifests/1.9.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/lz4/blobs/sha256:1757fefc3840e11c4822e4c2a95aa62aca44a4eaccce6f5c414ea5==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:1757fefc3840e11c4822e4c2a95aa62aca4######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.2.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/xz/blobs/sha256:dda25f66145c180884d0550a36d68491abd648011b9ac9156677396==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:dda25f66145c180884d0550a36d68491abd######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zlib/manifests/1.2.13
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:0082aa29a61507e237389ee4e9fb6a6ed0cbd5d341e3905527c08==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0082aa29a61507e237389ee4e9fb6a6ed0c######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zstd/manifests/1.5.2-3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zstd/blobs/sha256:006b5ab6a4616a8b6f59953cb9efb546d312e3ba231c303bb5674==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:006b5ab6a4616a8b6f59953cb9efb546d31######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/binutils/manifests/2.39_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/binutils/blobs/sha256:efa7497e2ea56d9b68ce41363cdc1a41cad032b3ae2fa2cbe==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:efa7497e2ea56d9b68ce41363cdc1a41cad######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gcc/manifests/12.2.0-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gcc/blobs/sha256:c7f773f9af560766b2d971d815a8d224c267088c05ed1f2b864bd1==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c7f773f9af560766b2d971d815a8d224c26######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/hugo/manifests/0.105.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:f711116a40f3e9c4fa027f1ebef5805f05b47b03cf5ec14e1ecce==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f711116a40f3e9c4fa027f1ebef5805f05b######################################################################## 100.0%
==> Installing dependencies for hugo: linux-headers@5.15, glibc, gmp, isl, mpfr, libmpc, lz4, xz, zlib, zstd, binutils and gcc
==> Installing hugo dependency: linux-headers@5.15
==> Pouring linux-headers@5.15--5.15.57.x86_64_linux.bottle.1.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/linux-headers@5.15/5.15.57: 963 files, 5.7MB
==> Installing hugo dependency: glibc
==> Pouring glibc--2.35_1.x86_64_linux.bottle.tar.gz
==> /home/linuxbrew/.linuxbrew/Cellar/glibc/2.35_1/sbin/ldconfig
==> Installing locale data for en_US.UTF-8
==> /home/linuxbrew/.linuxbrew/Cellar/glibc/2.35_1/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/glibc/2.35_1: 1,404 files, 47MB
==> Installing hugo dependency: gmp
==> Pouring gmp--6.2.1_1.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/gmp/6.2.1_1: 23 files, 3.9MB
==> Installing hugo dependency: isl
==> Pouring isl--0.25.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/isl/0.25: 74 files, 9.2MB
==> Installing hugo dependency: mpfr
==> Pouring mpfr--4.1.0-p13.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/mpfr/4.1.0-p13: 31 files, 6.0MB
==> Installing hugo dependency: libmpc
==> Pouring libmpc--1.2.1.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/libmpc/1.2.1: 13 files, 550.2KB
==> Installing hugo dependency: lz4
==> Pouring lz4--1.9.4.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/lz4/1.9.4: 22 files, 695.6KB
==> Installing hugo dependency: xz
==> Pouring xz--5.2.7.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/xz/5.2.7: 151 files, 2.5MB
==> Installing hugo dependency: zlib
==> Pouring zlib--1.2.13.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/zlib/1.2.13: 13 files, 472.7KB
==> Installing hugo dependency: zstd
==> Pouring zstd--1.5.2.x86_64_linux.bottle.3.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/zstd/1.5.2: 31 files, 2.6MB
==> Installing hugo dependency: binutils
==> Pouring binutils--2.39_1.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/binutils/2.39_1: 4,687 files, 370.3MB
==> Installing hugo dependency: gcc
==> Pouring gcc--12.2.0.x86_64_linux.bottle.1.tar.gz
Warning: The post-install step did not complete successfully
You can try again using:
  brew postinstall gcc
==> Summary
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/gcc/12.2.0: 1,623 files, 306.4MB
==> Installing hugo
==> Pouring hugo--0.105.0.x86_64_linux.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d
==> Summary
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/hugo/0.105.0: 48 files, 53.1MB
==> Running `brew cleanup hugo`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> hugo
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d
dw@Computer90:~$ hugo version
Inconsistency detected by ld.so: ./get-dynamic-info.h: 118: elf_get_dynamic_info: Assertion `info[DT_RUNPATH] == NULL' failed!
dw@Computer90:~$ brew list
==> Formulae
binutils  gcc  glibc  gmp  hugo  isl  libmpc  linux-headers@5.15  lz4  mpfr  xz  zlib  zstd

dw@Computer90:~$ hugo serve
-bash: /home/linuxbrew/.linuxbrew/bin/hugo: Bad address

Is that a known issue?

Not to me, but if I was guessing, I would guess itโ€™s a problem with your brew setup (maybe upgraded the same time as Hugo?) Do similar apps installed via Linux brew behave the same broken way?

Will try to investigate in virtual environment tomorrow and will let know.

:white_check_mark: macOS Brew working fine

Still TODO:
แ † Windows 11 + WSL + Ubuntu 2204.1.7.0 from Microsoft Store.
แ † Linux environment Ubuntu

Will do as soon as possible.

Meantime I have removed Ubuntu from Windows and reinstalled from fresh and repeated steps for Hugo 0.105.0 with following error:

-bash: /home/linuxbrew/.linuxbrew/bin/hugo: Bad address

:x: Windows 10 (21H2, 19044.1889) with WSL and Ubuntu 2204.1.7.0 from Microsoft Store.

Full log:

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

dw@Computer90:~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
[sudo] password for dw:
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/var
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var/homebrew
/home/linuxbrew/.linuxbrew/var/homebrew/linked
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/Caskroom
/home/linuxbrew/.linuxbrew/Frameworks

Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/bin/install -d -o dw -g dw -m 0755 /home/linuxbrew/.linuxbrew
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chmod ug=rwx /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chmod go-w /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> /usr/bin/sudo /bin/chown dw /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chgrp dw /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/chown -R dw:dw /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 220323, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 220323 (delta 0), reused 46 (delta 0), pack-reused 220276
Receiving objects: 100% (220323/220323), 61.80 MiB | 10.77 MiB/s, done.
Resolving deltas: 100% (162121/162121), done.
From https://github.com/Homebrew/brew
 * [new branch]          dependabot/bundler/Library/Homebrew/rubocop-1.38.0 -> origin/dependabot/bundler/Library/Homebrew/rubocop-1.38.0
 * [new branch]          less-agressive-core-tap -> origin/less-agressive-core-tap
 * [new branch]          master                  -> origin/master
Updating files: 100% (2930/2930), done.
HEAD is now at 06b7573e0 Merge pull request #14140 from EricFromCanada/docs-update-cookbooks
==> Tapping homebrew/core
remote: Enumerating objects: 1334018, done.
remote: Counting objects: 100% (536/536), done.
remote: Compressing objects: 100% (307/307), done.
remote: Total 1334018 (delta 287), reused 372 (delta 229), pack-reused 1333482
Receiving objects: 100% (1334018/1334018), 507.36 MiB | 2.77 MiB/s, done.
Resolving deltas: 100% (926360/926360), done.
From https://github.com/Homebrew/homebrew-core
 * [new branch]              master     -> origin/master
Updating files: 100% (6701/6701), done.
HEAD is now at b3284ccef4a hicolor-icon-theme: update 0.17 bottle.
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:fc45ee6eddf4c7a17f4373dde7b1bc8a58255ea61e6847d3bf895225b28d072a
######################################################################## 100.0%
==> Pouring portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz
Updated 1 tap (homebrew/core).
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.
  Instructions on how to configure your shell for Homebrew
  can be found in the 'Next steps' section below.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run these three commands in your terminal to add Homebrew to your PATH:
    echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/dw/.profile
    echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/dw/.profile
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- Install Homebrew's dependencies if you have sudo access:
    sudo apt-get install build-essential
  For more information, see:
    https://docs.brew.sh/Homebrew-on-Linux
- We recommend that you install GCC:
    brew install gcc
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

dw@Computer90:~$ echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/dw/.profile
dw@Computer90:~$ echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/dw/.profile
dw@Computer90:~$ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
dw@Computer90:~$ brew install hugo
Running `brew update --auto-update`...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).

==> Downloading https://ghcr.io/v2/homebrew/core/gmp/manifests/6.2.1_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gmp/blobs/sha256:786ae29f0c0b06ea86e42bd9c6ac2c49bd5757da037dead7053e8b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:786ae29f0c0b06ea86e42bd9c6ac2c49bd5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/isl/manifests/0.25
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/isl/blobs/sha256:c0244c95ed9cc89b826868de83bec3150fcc120add126501717677
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c0244c95ed9cc89b826868de83bec3150fc
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpfr/manifests/4.1.0-p13
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpfr/blobs/sha256:345a3d99db0f4149f84f0aa16c0ee9c4275f695e4fa0f6d2ae1e8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:345a3d99db0f4149f84f0aa16c0ee9c4275
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libmpc/manifests/1.2.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libmpc/blobs/sha256:d74eb5f1377d8fa72fad88baca1bd5f00c29d45ba186fbec89a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d74eb5f1377d8fa72fad88baca1bd5f00c2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/lz4/manifests/1.9.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/lz4/blobs/sha256:1757fefc3840e11c4822e4c2a95aa62aca44a4eaccce6f5c414ea5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:1757fefc3840e11c4822e4c2a95aa62aca4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.2.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/xz/blobs/sha256:dda25f66145c180884d0550a36d68491abd648011b9ac9156677396
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:dda25f66145c180884d0550a36d68491abd
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zlib/manifests/1.2.13
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:0082aa29a61507e237389ee4e9fb6a6ed0cbd5d341e3905527c08
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0082aa29a61507e237389ee4e9fb6a6ed0c
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zstd/manifests/1.5.2-3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/zstd/blobs/sha256:006b5ab6a4616a8b6f59953cb9efb546d312e3ba231c303bb5674
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:006b5ab6a4616a8b6f59953cb9efb546d31
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/binutils/manifests/2.39_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/binutils/blobs/sha256:efa7497e2ea56d9b68ce41363cdc1a41cad032b3ae2fa2cbe
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:efa7497e2ea56d9b68ce41363cdc1a41cad
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gcc/manifests/12.2.0-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gcc/blobs/sha256:c7f773f9af560766b2d971d815a8d224c267088c05ed1f2b864bd1
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c7f773f9af560766b2d971d815a8d224c26
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/hugo/manifests/0.105.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:f711116a40f3e9c4fa027f1ebef5805f05b47b03cf5ec14e1ecce
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f711116a40f3e9c4fa027f1ebef5805f05b
######################################################################## 100.0%
==> Installing dependencies for hugo: gmp, isl, mpfr, libmpc, lz4, xz, zlib, zstd, binutils and gcc
==> Installing hugo dependency: gmp
==> Pouring gmp--6.2.1_1.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/gmp/6.2.1_1: 23 files, 3.9MB
==> Installing hugo dependency: isl
==> Pouring isl--0.25.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/isl/0.25: 74 files, 9.2MB
==> Installing hugo dependency: mpfr
==> Pouring mpfr--4.1.0-p13.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/mpfr/4.1.0-p13: 31 files, 6.0MB
==> Installing hugo dependency: libmpc
==> Pouring libmpc--1.2.1.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/libmpc/1.2.1: 13 files, 550KB
==> Installing hugo dependency: lz4
==> Pouring lz4--1.9.4.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/lz4/1.9.4: 22 files, 695.4KB
==> Installing hugo dependency: xz
==> Pouring xz--5.2.7.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/xz/5.2.7: 151 files, 2.5MB
==> Installing hugo dependency: zlib
==> Pouring zlib--1.2.13.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/zlib/1.2.13: 13 files, 472.5KB
==> Installing hugo dependency: zstd
==> Pouring zstd--1.5.2.x86_64_linux.bottle.3.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/zstd/1.5.2: 31 files, 2.6MB
==> Installing hugo dependency: binutils
==> Pouring binutils--2.39_1.x86_64_linux.bottle.tar.gz
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/binutils/2.39_1: 4,687 files, 370.3MB
==> Installing hugo dependency: gcc
==> Pouring gcc--12.2.0.x86_64_linux.bottle.1.tar.gz
Warning: The post-install step did not complete successfully
You can try again using:
  brew postinstall gcc
==> Summary
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/gcc/12.2.0: 1,623 files, 306.4MB
==> Installing hugo
==> Pouring hugo--0.105.0.x86_64_linux.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d
==> Summary
๐Ÿบ  /home/linuxbrew/.linuxbrew/Cellar/hugo/0.105.0: 48 files, 53.1MB
==> Running `brew cleanup hugo`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> hugo
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d
dw@Computer90:~$ hugo version
-bash: /home/linuxbrew/.linuxbrew/bin/hugo: Bad address
dw@Computer90:~$ hugo serve
-bash: /home/linuxbrew/.linuxbrew/bin/hugo: Bad address
dw@Computer90:~$

I think I seen something similar in a recent thread โ€ฆ @jmooring ?

Just tested with:

  1. Win 11

  2. WSL 2 (I did not test WSL 1)

  3. Deleted any previous images using PowerShell

    Warning - this will completely delete the image from:
    C:\Users\user\AppData\Local\Packages\CanonicalGroupLimited.xxx

    wsl -l -v
    wsl --unregister <whatever>
    
  4. Fresh install of Ubuntu 22.04.1 LTS from the MS store

  5. Logged into Ubuntu as a regular user, not root

  6. Install brew using instructions from https://brew.sh

  7. Install hugo with brew install hugo

No problems.

Opinion: if you are only using brew on Linux to install Hugo, itโ€™s a bit heavy. Installing from source is a breeze, and easy to keep up-to-date.

It install fine, but does it run?

Yes, it runs fine.

Thanks. I will investigate further.

Through my investigation I downloaded hugo_0.105.0_linux-amd64.tar.gz, unpacked it and run ./hugo version and it is working fine, hence there is no issue with Hugo itself (maybe Brew package?)

Interesting is that hugo command through Brew references to /home/linuxbrew/.linuxbrew/bin/brew where this is referencing to /home/linuxbrew/.linuxbrew/Cellar/hugo/0.105.0/bin/hugo

So, as unpacked from hugo_0.105.0_linux-amd64.tar.gz file hugo is executing correctly, I decided to overwrite hugo (delivered through brew) file with the extracted one.

The result when running hugo command is exactly the same.

-bash: /home/linuxbrew/.linuxbrew/bin/hugo: Bad address

Even if run ./hugo from /home/linuxbrew/.linuxbrew/Cellar/hugo/0.105.0/bin/ directly.

This looks like some kind of system-wide issue.

Then I found this information on Homebrew for Linux website which references to similar issue somehow.


Windows Subsystem for Linux (WSL) 1

Due to [known issues](https://github.com/microsoft/WSL/issues/8219) with WSL 1, you may experience issues running various executables installed by Homebrew. We recommend you switch to WSL 2 instead.

I removed WSL (which by default install WSL 1) and decided to install WSL 2 on Windows 10 according to Microsoft instruction which just refers to running one command from elevated Command Prompt (rather then adding feature from Control panel in Windows).

wsl.exe --install

I removed Ubuntu for Windows prior to that and after WSL 2 finished and the computer restarted I tried again.

By default WSL 2 install Ubuntu 20.04 (2004.2020.424.0) which I removed and installed Ubuntu 22.04.1 from Microsoft Store.

Following that, I installed Brew and then Hugo (in that case, because there was an update already, it installed 0.106.0).

An elevated command prompt is also shown running ubuntu in Version 2 (wsl -l -v).

This sorted the issue and Hugo run well.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.