# Please help me with .deb files

**URL:** <https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082>\
**Category:** support\
**Created:** [April 27, 2020, 9:26pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082 "2020-04-27T21:26:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ominty](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ominty/32/2716_2.png) [@ominty](https://discourse.gohugo.io/u/ominty)\
**Post date:** [April 27, 2020, 9:26pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/1 "2020-04-27T21:26:53Z")

</div>

> [@\[Solved\] How to use Hugo on linuxmint from .deb install](https://discourse.gohugo.io/t/solved-how-to-use-hugo-on-linuxmint-from-deb-install/8642):
>
> Hi, I changed my OS (arch -\> linuxmint) and I just installed the last version of hugo with the .deb file. But when I tried hugo server the bash says that /usr/bin/hugo: no file or folder of this type (approximatively translated from French ^^). How do I use hugo when I installed it from a .deb? Thanks =) K.

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

> [@Hugo 0.30.2 not running on Mint18.2](https://discourse.gohugo.io/t/hugo-0-30-2-not-running-on-mint18-2/9072/3):
>
> sorry for any inconvenience, something seemed to have gone wrong on my machine. After cold reset and installing 0.25.1 everything seems to work again. Will try 0.30.2 tomorrow.

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.

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [April 28, 2020, 12:54am UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/2 "2020-04-28T00:54:00Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![ominty](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ominty/32/2716_2.png) [@ominty](https://discourse.gohugo.io/u/ominty)\
**Post date:** [April 28, 2020, 10:56am UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/3 "2020-04-28T10:56:11Z")

</div>

```auto
# 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:

```auto
$ 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.

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [April 28, 2020, 1:43pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/4 "2020-04-28T13:43:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ominty](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ominty/32/2716_2.png) [@ominty](https://discourse.gohugo.io/u/ominty)\
**Post date:** [April 28, 2020, 2:53pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/5 "2020-04-28T14:53:41Z")

</div>

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

```

and

```auto
# 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:

```auto
$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.

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [April 29, 2020, 1:54pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/6 "2020-04-29T13:54:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ominty](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ominty/32/2716_2.png) [@ominty](https://discourse.gohugo.io/u/ominty)\
**Post date:** [April 29, 2020, 3:16pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/7 "2020-04-29T15:16:12Z")

</div>

This is what the version from the Buster repo

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

```

tells me:

```auto
# which hugo
/usr/bin/hugo

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

```

will check the other points later …

---

<div class="post-metadata">

**Author:** ![ominty](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ominty/32/2716_2.png) [@ominty](https://discourse.gohugo.io/u/ominty)\
**Post date:** [May 5, 2020, 9:33pm UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/8 "2020-05-05T21:33:38Z")

</div>

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

and this works.

```auto
$ 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.

---

<div class="post-metadata">

**Author:** ![iota](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@iota](https://discourse.gohugo.io/u/iota)\
**Post date:** [June 28, 2020, 9:49am UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/9 "2020-06-28T09:49:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iota](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@iota](https://discourse.gohugo.io/u/iota)\
**Post date:** [June 28, 2020, 10:18am UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/10 "2020-06-28T10:18:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iota](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@iota](https://discourse.gohugo.io/u/iota)\
**Post date:** [June 28, 2020, 10:27am UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/11 "2020-06-28T10:27:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [August 15, 2020, 1:36am UTC](https://discourse.gohugo.io/t/please-help-me-with-deb-files/25082/12 "2020-08-15T01:36:02Z")

</div>

Glad to hear it. I don’t use distribution packages for certain things like runtimes and web dev libs etc. They are updated too frequently, as in the case of Hugo.
