HUGO

Please help me with .deb files


there seems to be something wrong with these .deb files …
I’ve seen this with Mint 18 before

and now also with Debian Buster by upgrading from 0.54 from the repo to 0.66 from downloaded .deb
Never seen this before from other apps.

What are the errors you get when you try to install the package?

Paste output of something like:

sudo dpkg -i hugo_installer_deb_file.deb

# dpkg -i hugo_0.66.0_Linux-64bit.deb
(Lese Datenbank ... 284847 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von hugo_0.66.0_Linux-64bit.deb ...
Entpacken von hugo (0.66.0) über (0.55.6+really0.54.0-1) ...
hugo (0.66.0) wird eingerichtet ...
Trigger für man-db (2.8.5-2) werden verarbeitet ...

which is something like

(Read database … 284847 files and directories are currently installed)
Preparation for unpacking hugo_0.66.0_Linux-64bit.deb …
Unpacking of hugo (0.66.0) over (.55.6+really0.54.0-1) …
hugo (0.66.0) is configured …
Triggers for man-db (2.8.5-2) are processed …

and then I get as user:

$ hugo server -w -F --disableFastRender
bash: /usr/bin/hugo: Datei oder Verzeichnis nicht gefunden

when I purge hugo again and reinstall from Debian repo - no problem, hugo running.

Please install the hugo package as described above.
Then run and paste the output of:

dpkg -L hugo

or

dpkg -L hugo | grep bin

as well as the output of

which hugo and/or whereis hugo

as well as what your $PATH variable in .bashrc looks like.

# dpkg -L hugo
/usr
/usr/local
/usr/local/bin
/usr/local/bin/hugo

and

# which hugo
/usr/local/bin/hugo
# whereis hugo
hugo: /usr/local/bin/hugo

as well as the PATH variable for the current user calling hugo:

$PATH
bash: /home/{username}/.local/bin:/home/{username}/bin:/home/{username}/bin/scripte:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:

btw: this is a Debian Buster system - and there is by default no sudo. I use root account for installing and uninstalling packages.

There appears to be a hugo path mismatch.

It’s looking for /usr/bin/hugo but the package is installing the binary in /usr/local/bin

That however should not matter as you have both /usr/local/bin and /usr/bin in the user’s path.

So, the problem could possibly in your bash config. Do you have an alias for hugo maybe? If not, I might try as another user or as the same user but with a default debian .bashrc perhaps?

The problem is not in the package, as I use the same package on Ubuntu, which is a Debian derived distro. I’ve looked at the post/pre install scripts, debian rules file and I can’t seem to see anything out of place.

I would try what I suggested and report back.

1 Like

This is what the version from the Buster repo

$ hugo version
Hugo Static Site Generator v0.54.0/extended linux/amd64 BuildDate: 2019-06-04T19:16:36Z

tells me:

# which hugo
/usr/bin/hugo

# whereis hugo
hugo: /usr/bin/hugo /usr/share/man/man1/hugo.1.gz

will check the other points later …

In the meantime I took a version from here:
http://snapshot.debian.org/package/hugo/0.64.1-1/

and this works.

$ which hugo
/usr/bin/hugo

$ whereis hugo
hugo: /usr/bin/hugo /usr/share/man/man1/hugo.1.gz

Sorry, but I have a lot of things running on that machine so I don’t have the possibility to reboot that computer as it seems to me I have to do after using that version 0.66 from the hugo site.
Debian build simply is running.

Hi there,

I faced a similar issue and found a workaround:

instead of hugo server , use /usr/local/bin/hugo server

Hope that helps, cheers

More info:

the problem does not occur when hugo is installed from Debian’s Buster repository with apt install hugo (hugo version 0.55.6+really0.54.0-1 is then installed and hugo server runs smoothly)

But an installation with a .deb packages from github provokes this error:

  • wget -c https://github.com/gohugoio/hugo/releases/download/v0.73.0/hugo_extended_0.73.0_Linux-64bit.deb
  • sudo dpkg -i hugo_extended_0.73.0_Linux-64bit.deb
  • hugo server
    bash: /usr/bin/hugo: No such file or directory

Details of my configuration

  • dpkg -L hugo
    /usr
    /usr/local
    /usr/local/bin
    /usr/local/bin/hugo

Ok I got it: I had those lines in ~/.bashrc

export GEM_HOME=$HOME/Persistent/dev/gems
export PATH=$HOME/Persistent/dev/gems/bin:$PATH

Removing them solved the problem… You was right @Hash_Borgir, nice catch!