SSH / Hugo "command not found"

Hi, I know, I use an unusual way, but yesterday, when I used SSH on my webserver, hugo still worked.

Webserver / HUGO / bin / hugo (latest version 7.2. 64bit Linux) and the website is at HUGO/NAME

Yesterday, I could do this:

cd/HUGO/NAME/

and

…/bin/hugo to run hugo.

Site workes well.

Today, I changed the name of the NAME folder to NEWNAME, and did cd NEWNAME and …/bin/hugo

and got greeted by

HUGO/bin hugo
bash: hugo: command not found

however, when I run

file hugo

I get

hugo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

Anybody an idea, why? I did delete hugo and jsut uploaded the latest version again and unpacked it onto the server. Even a try in a different folder /NEWBIN did not work. Same results as in /bin

It’s not quite clear to me WHERE EXACTLY your hugo binary is located. You should use it via absolute path from root, like /path/to/where/you/installed/hugo instead of ./path/to/hugo.

Also make sure that the file is executable with chmod +x hugo.

make sure that the folder where you placed Hugo shows up in the $PATH variable.

echo $PATH

Depending on the server, you may want to move it to /usr/bin or something like that.

It is installed here (changed the exact names for this reply):

www/htdocs/123456789/HUGO/bin

CHMOD is 755

Yesterday, I was able to create and publish a site (www.vlkr.be) - using this:
cd www/htdocs/123456789/HUGO/SITE
…/bin/hugo

hugo

Today, no matter what I do, if I cd into bin or use the whole path in one SSH entry, always get “command not found” however, file hugo gets me this:

hugo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

I did upload it again using a different basic folder (NEWHUGO), and also ./hugo new site NAME as I read somewhere, that all-inkl.com needs the ./ before hugo. It worked. Strange.

I will therefore mark this as solution and close the thread. Thanks to all for your help!

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