Deployment failed - Several files not found

Hello all

I am trying to deploy my website following the instructions from https://sourcethemes.com/academic/docs/deployment/ and using the GitHub pages. I have created the needed repositories and followed the instructions, but when it is time to use hugo I get the following errors:

eirini@eirinis-laptop:~/Documents/Git/My_Website$ hugo
Error: Unable to locate Config file. Perhaps you need to create a new site.
       Run `hugo help new` for details. (Config File "config" Not Found in "[/home/eirini/Documents/Git/My_Website]")

eirini@eirinis-laptop:~/Documents/Git/My_Website$ cd config/_default/
eirini@eirinis-laptop:~/Documents/Git/My_Website/config/_default$ hugo
ERROR 2020/01/13 12:14:33 Current theme does not support Hugo version 0.40.1. Minimum version required is 0.55
Building sites … ERROR 2020/01/13 12:14:33 Failed to add template "theme/404.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/404.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/404.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/_default/list.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/_default/list.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/_default/list.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/_default/rss.xml" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/_default/rss.xml": template: theme/_default/rss.xml:3: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/_default/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/_default/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/_default/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/authors/list.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/authors/list.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/authors/list.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/authors/terms.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/authors/terms.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/authors/terms.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/docs/list.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/docs/list.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/docs/list.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/docs/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/docs/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/docs/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/index.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/index.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/index.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "_text/theme/index.json" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/index.json": template: theme/index.json:3: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/comments.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/comments.html": template: theme/partials/comments.html:1: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/cookie_consent.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/cookie_consent.html": template: theme/partials/cookie_consent.html:1: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/docs_layout.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/docs_layout.html": template: theme/partials/docs_layout.html:34: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/docs_sidebar.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/docs_sidebar.html": template: theme/partials/docs_sidebar.html:5: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/functions/get_pub_types.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/functions/get_pub_types.html": template: theme/partials/functions/get_pub_types.html:3: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/functions/parse_theme.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/functions/parse_theme.html": template: theme/partials/functions/parse_theme.html:4: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/li_card.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/li_card.html": template: theme/partials/li_card.html:8: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/li_citation.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/li_citation.html": template: theme/partials/li_citation.html:5: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/li_compact.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/li_compact.html": template: theme/partials/li_compact.html:9: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/li_list.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/li_list.html": template: theme/partials/li_list.html:10: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/navbar.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/navbar.html": template: theme/partials/navbar.html:7: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/page_author.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/page_author.html": template: theme/partials/page_author.html:3: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/page_header.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/page_header.html": template: theme/partials/page_header.html:9: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/page_links.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/page_links.html": template: theme/partials/page_links.html:9: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/page_links_div.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/page_links_div.html": template: theme/partials/page_links_div.html:10: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/page_metadata.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/page_metadata.html": template: theme/partials/page_metadata.html:22: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/page_metadata_authors.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/page_metadata_authors.html": template: theme/partials/page_metadata_authors.html:6: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/project_li_showcase.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/project_li_showcase.html": template: theme/partials/project_li_showcase.html:6: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/search.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/search.html": template: theme/partials/search.html:15: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/section_pager.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/section_pager.html": template: theme/partials/section_pager.html:5: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/share.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/share.html": template: theme/partials/share.html:1: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/site_footer.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/site_footer.html": template: theme/partials/site_footer.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/site_head.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/site_head.html": template: theme/partials/site_head.html:6: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/site_js.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/site_js.html": template: theme/partials/site_js.html:4: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/tags.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/tags.html": template: theme/partials/tags.html:5: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widget_page.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widget_page.html": template: theme/partials/widget_page.html:7: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/about.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/about.html": template: theme/partials/widgets/about.html:6: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/contact.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/contact.html": template: theme/partials/widgets/contact.html:18: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/featured.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/featured.html": template: theme/partials/widgets/featured.html:11: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/featurette.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/featurette.html": template: theme/partials/widgets/featurette.html:22: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/hero.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/hero.html": template: theme/partials/widgets/hero.html:23: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/pages.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/pages.html": template: theme/partials/widgets/pages.html:10: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/people.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/people.html": template: theme/partials/widgets/people.html:23: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/portfolio.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/portfolio.html": template: theme/partials/widgets/portfolio.html:43: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/partials/widgets/tag_cloud.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/partials/widgets/tag_cloud.html": template: theme/partials/widgets/tag_cloud.html:12: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/project/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/project/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/project/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/publication/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/publication/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/publication/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/section/docs.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/docs.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/docs.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/section/post.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/post.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/post.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/section/publication.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/publication.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/publication.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/section/talk.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/talk.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/section/talk.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/shortcodes/figure.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/shortcodes/figure.html": template: theme/shortcodes/figure.html:4: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/shortcodes/gallery.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/shortcodes/gallery.html": template: theme/shortcodes/gallery.html:3: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/shortcodes/list_categories.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/shortcodes/list_categories.html": template: theme/shortcodes/list_categories.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/shortcodes/list_tags.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/shortcodes/list_tags.html": template: theme/shortcodes/list_tags.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/shortcodes/video.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/shortcodes/video.html": template: theme/shortcodes/video.html:5: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 Failed to add template "theme/slides/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/slides/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/slides/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/talk/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/talk/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/talk/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 Failed to add template "theme/widget_page/single.html" in path "/home/eirini/Documents/Git/My_Website/themes/academic/layouts/widget_page/single.html": template: /home/eirini/Documents/Git/My_Website/themes/academic/layouts/widget_page/single.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/_default/rss.xml : template: theme/_default/rss.xml:3: function "site" not defined
ERROR 2020/01/13 12:14:33 _text/theme/index.json : template: theme/index.json:3: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/comments.html : template: theme/partials/comments.html:1: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/cookie_consent.html : template: theme/partials/cookie_consent.html:1: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/docs_layout.html : template: theme/partials/docs_layout.html:34: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/docs_sidebar.html : template: theme/partials/docs_sidebar.html:5: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/functions/get_pub_types.html : template: theme/partials/functions/get_pub_types.html:3: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/functions/parse_theme.html : template: theme/partials/functions/parse_theme.html:4: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/li_card.html : template: theme/partials/li_card.html:8: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/li_citation.html : template: theme/partials/li_citation.html:5: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/li_compact.html : template: theme/partials/li_compact.html:9: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/li_list.html : template: theme/partials/li_list.html:10: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/navbar.html : template: theme/partials/navbar.html:7: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/page_author.html : template: theme/partials/page_author.html:3: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/page_header.html : template: theme/partials/page_header.html:9: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/page_links.html : template: theme/partials/page_links.html:9: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/page_links_div.html : template: theme/partials/page_links_div.html:10: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/page_metadata.html : template: theme/partials/page_metadata.html:22: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/page_metadata_authors.html : template: theme/partials/page_metadata_authors.html:6: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/project_li_showcase.html : template: theme/partials/project_li_showcase.html:6: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/search.html : template: theme/partials/search.html:15: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/section_pager.html : template: theme/partials/section_pager.html:5: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/share.html : template: theme/partials/share.html:1: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/site_footer.html : template: theme/partials/site_footer.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/site_head.html : template: theme/partials/site_head.html:6: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/site_js.html : template: theme/partials/site_js.html:4: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/tags.html : template: theme/partials/tags.html:5: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/widget_page.html : template: theme/partials/widget_page.html:7: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/about.html : template: theme/partials/widgets/about.html:6: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/contact.html : template: theme/partials/widgets/contact.html:18: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/featured.html : template: theme/partials/widgets/featured.html:11: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/widgets/featurette.html : template: theme/partials/widgets/featurette.html:22: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/hero.html : template: theme/partials/widgets/hero.html:23: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/pages.html : template: theme/partials/widgets/pages.html:10: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/people.html : template: theme/partials/widgets/people.html:23: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/partials/widgets/portfolio.html : template: theme/partials/widgets/portfolio.html:43: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/partials/widgets/tag_cloud.html : template: theme/partials/widgets/tag_cloud.html:12: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/shortcodes/figure.html : template: theme/shortcodes/figure.html:4: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/shortcodes/gallery.html : template: theme/shortcodes/gallery.html:3: unexpected "=" in operand
ERROR 2020/01/13 12:14:33 theme/shortcodes/list_categories.html : template: theme/shortcodes/list_categories.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/shortcodes/list_tags.html : template: theme/shortcodes/list_tags.html:2: function "site" not defined
ERROR 2020/01/13 12:14:33 theme/shortcodes/video.html : template: theme/shortcodes/video.html:5: unexpected "=" in operand
Total in 137 ms
Error: Error building site: No source directory found, expecting to find it at /home/eirini/Documents/Git/My_Website/config/_default/content

eirini@eirinis-laptop:~/Documents/Git/My_Website$ ls
academic.Rproj  config  content  data  LICENSE.md  netlify.toml  public  README.md  scripts  static  themes  update_academic.sh  view.sh

I really cannot understand those errors, since I have not much experience with Hugo or similar. I would appreciate any kind of help on how to solve this.

Best,
E.

If you look at the first error, the problem is there’s no config file.

So you should either have the file config.toml (or yaml or json) in your My_Website directory, or a bunch of files in the content/_default directory?

Looking at the output at the end of your post, it seems you’re going for the config directory option - so what files have you got in there?

If you’ve got a git repository, that would be the easiest way to give help.

Here is my GitHub repository https://github.com/Eirinits/academic-kickstart

I have tried to have everything in the same directory as well, but errors keep popping up.

Thank you once again!

Could this be the root cause?

ERROR 2020/01/13 12:14:33 Current theme does not support Hugo version 0.40.1. Minimum version required is 0.55

I tried to solve this but with no luck…

if I get hugo using apt it seems that I cannot get the latest version (as described here).

eirini@eirinis-laptop:/$ sudo apt -y install hugo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm7 libpython-all-dev libreadline5 python-all python-all-dev python-asn1crypto python-cffi-backend python-crypto python-cryptography python-dbus python-enum34 python-idna python-ipaddress
  python-keyring python-keyrings.alt python-secretstorage python-wheel python-xdg
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  hugo
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 4 410 kB of archives.
After this operation, 17,7 MB of additional disk space will be used.
Get:1 http://no.archive.ubuntu.com/ubuntu bionic/universe amd64 hugo amd64 0.40.1-1 [4 410 kB]
Fetched 4 410 kB in 1s (7 284 kB/s)   
Selecting previously unselected package hugo.
(Reading database ... 215450 files and directories currently installed.)
Preparing to unpack .../hugo_0.40.1-1_amd64.deb ...
Unpacking hugo (0.40.1-1) ...
Setting up hugo (0.40.1-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
eirini@eirinis-laptop:/$ which hugo
/usr/bin/hugo
eirini@eirinis-laptop:/$ hugo version
Hugo Static Site Generator v0.40.1 linux/amd64 BuildDate: 2018-04-25T17:16:11Z

But when I get it through snap, I encounter another problem:

eirini@eirinis-laptop:/usr/bin$ snap install hugo --channel=extended
hugo (extended/stable) 0.62.2 from Hugo Authors installed
eirini@eirinis-laptop:~/Documents/Git/My_Website$ hugo
bash: /usr/bin/hugo: No such file or directory

I’m not familiar with snap and don’t have a Linux machine to check it out, but maybe you can try homebrew? https://gohugo.io/getting-started/installing/#homebrew-linux

If that doesn’t work, the best thing I can suggest is to manually unpack Hugo from .tar.gz

I think the command will be tar -xzf path_to_targz -C /usr/bin
You can also try /usr/local/bin

Alternatively, you can try extracting the tar into your site’s root folder and then run Hugo from there with ./hugo; that’s how I do it on my MacOS and I’d expect it to work on Linux too.

1 Like

Your last suggestion worked as a charm! Thank you so much for the help :grinning:

2 Likes