Score:0

Installing the lf file manager - lf command not found after installation

fo flag

I've just installed the lf file manager on my computer (Ubuntu 22.04.2) by typing the following command in my terminal, as indicated on this GitHub page:

env CGO_ENABLED=0 go install -ldflags="-s -w" github.com/gokcehan/lf@latest

(I first had to install the go compiler and language using sudo apt install golang-go. Without this the terminal displayed the message env: ‘go’: No such file or directory.)

According to the same GitHub page,

After the installation lf command should start the application in the current directory.

However, running either of lf, lf --help or lf --version displays

lf: command not found

Have I missed a step in the installation? Any suggestions to fix this? I apologise if this is a silly question - I am a complete beginner in Linux. :)

FedKad avatar
cn flag
Why not just `apt install lf`?
Vadim avatar
fo flag
@FedKad when I type `sudo apt install lf` it says `E: Unable to locate package lf` :(
FedKad avatar
cn flag
Sorry. It seems it is `apt install lfm` in 22.04: https://packages.ubuntu.com/jammy/lfm
Vadim avatar
fo flag
@FedKad Thank you so much, it worked!
Score:0
ms flag

go install places the executable into the $GOPATH/bin directory, So to make it work you must add $GOPATH/bin to your PATH variable. To do that you can simply add this line to your ~/.bashrc file

export PATH="$(go env GOPATH)/bin:$PATH"
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.