System: Linux Mint 22.1 Xfce, with the following golang files installed.
Screenshot
I’d like to install meme
- https://www.linuxlinks.com/linux-candy-meme-fun-tool-create-memes/
- https://github.com/nomad-software/meme
But when I try the installation instruction from the GitHub page, I get
$ go get -u -v github.com/nomad-software/meme
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
When I replace get
with install
, I get:
$ go install -u -v github.com/nomad-software/meme
flag provided but not defined: -u
usage: go install [build flags] [packages]
Run 'go help install' for details.
go help install
returns an overwhelming amount of info I don’t understand.
There is no package in the repo, and no .deb or .appimage on the GitHub Releases page. (I don’t do Flatpaks on this machine.) Any tips on how I can get this program to install?
Thanks
EDIT
I’ve got a little further now.
$ go install github.com/nomad-software/meme@latest
go: downloading github.com/nomad-software/meme v1.0.2
go: downloading github.com/fatih/color v1.15.0
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.19
go: downloading github.com/fogleman/gg v1.3.0
go: downloading golang.org/x/sys v0.12.0
go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
go: downloading golang.org/x/image v0.12.0
But:
$ meme -h
Command 'meme' not found, did you mean:
command 'mme' from deb plc-utils-extra (0.0.6+git20230504.1ba7d5a0-1)
command 'mame' from deb mame (0.261+dfsg.1-1)
command 'memo' from deb memo (1.7.1-5)
Try: sudo apt install <deb name>
EDIT 2:
To get it working:
- Go to my home directory
- Show hidden files
- Open .bashrc in a text editor
- Add the following at the end of the file
# meme path
export PATH="$HOME/go/bin:$PATH"
- Save the .bashrc file
Now I can open a terminal and use the program. :)
Thanks to [email protected]
Read the message its telling you…
go install
has no-u
flag.$ go install github.com/nomad-software/meme
$ go install github.com/nomad-software/meme go: 'go install' requires a version when current directory is not in a module Try 'go install github.com/nomad-software/meme@latest' to install the latest version
$ go install github.com/nomad-software/meme@latest go: downloading github.com/nomad-software/meme v1.0.2 go: downloading github.com/fatih/color v1.15.0 go: downloading github.com/mitchellh/go-homedir v1.1.0 go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 go: downloading github.com/mattn/go-colorable v0.1.13 go: downloading github.com/mattn/go-isatty v0.0.19 go: downloading github.com/fogleman/gg v1.3.0 go: downloading golang.org/x/sys v0.12.0 go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 go: downloading golang.org/x/image v0.12.0
$ meme -h Command 'meme' not found, did you mean: command 'mme' from deb plc-utils-extra (0.0.6+git20230504.1ba7d5a0-1) command 'mame' from deb mame (0.261+dfsg.1-1) command 'memo' from deb memo (1.7.1-5) Try: sudo apt install <deb name>
add the go binary path to your $PATH. i never use go before but i think its binary path is placed on
~/.go/bin
. if it does exist, u can add this# other configs.. export PATH="$HOME/go/bin:$PATH" # other configs..
to your shell config (.bashrc or .zshrc). then reload the changes by
source ~/.bashrc
orsource ~/.zshrc
depends on ur shell.This is correct. The binary is in a folder that is not in his path which is why he can’t call the binary.
Exploring my home directory, I found meme in this directory:
/home/klu9/go/bin/
So to confirm, I should add this to the end of my
.bashrc
file?# meme path export PATH="$HOME/go/bin:$PATH"
and then I would be able to use meme in the terminal?
yes!
Thanks so much!