Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions Errors when running pimp-my-shell #65

Open
TheZenTester opened this issue Nov 24, 2023 · 1 comment
Open

Permissions Errors when running pimp-my-shell #65

TheZenTester opened this issue Nov 24, 2023 · 1 comment

Comments

@TheZenTester
Copy link

Describe the bug
I'm required to run as sudo in order to successfully install. If not run as sudo, p10k configure will not run, and error messages appear. Is there any way to install without requiring sudo perms?

To Reproduce
Steps to reproduce the behavior:

  1. Download pimp-my-shell v 2.1.3
  2. Run ./pimp-my-shell
  3. errors appear during install.

Screenshots

First error appears:

image

Error messages appearing while running the install:

vim-go: gotags not found. Installing github.com/jstemmer/gotags@master to folder
^/usr/local//bin/
vim-go: Error installing github.com/jstemmer/gotags@master: go: writing stat cac
he: mkdir /usr/local/pkg/mod/cache/download/github.com/jstemmer/gotags: permissi
on denied
vim-go: go: downloading github.com/jstemmer/gotags v1.4.2-0.20180202163508-7de70
45e69ff
vim-go: go: github.com/jstemmer/gotags@master: mkdir /usr/local/pkg/mod/cache/do
wnload/github.com/jstemmer/gotags: permission denied
vim-go: impl not found. Installing github.com/josharian/impl@main to folder /usr
/local//bin/
vim-go: Error installing github.com/josharian/impl@main: go: writing stat cache:
 mkdir /usr/local/pkg/mod/cache/download/github.com/josharian/impl: permission d
enied
vim-go: go: downloading github.com/josharian/impl v1.2.1-0.20230412175720-30a6be
b5f7cc
vim-go: go: github.com/josharian/impl@main: mkdir /usr/local/pkg/mod/cache/downl
oad/github.com/josharian/impl: permission denied

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS jammy
  • pimp-my-shell v 2.1.3
@mr-pmillz
Copy link
Owner

@TheZenTester
Hmmm, it looks like vim-go is trying to install deps in /usr/local
What is the output from:

echo $GOPATH
which go

Try setting your GOPATH and running again

# see https://zchee.github.io/golang-wiki/GOPATH/ and https://maelvls.dev/go111module-everywhere/ for more info
# TL:DR
# GOPATH is still supported even though it has been replaced by Go modules and is technically deprecated since Go 1.16, BUT, you can still use GOPATH to specify where you want your go binaries installed.
[[ ! -d "${HOME}/go" ]] && mkdir "${HOME}/go"
if [[ -z "${GOPATH}" ]]; then
cat << 'EOF' >> "${HOME}/.zshrc"

# Add ~/go/bin to path
[[ ":$PATH:" != *":${HOME}/go/bin:"* ]] && export PATH="${PATH}:${HOME}/go/bin"
# Set GOPATH
if [[ -z "${GOPATH}" ]]; then export GOPATH="${HOME}/go"; fi
EOF
fi

source ~/.zshrc

I haven't looked at this codebase in a while and no longer actively maintaining it, but perhaps this might resolve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants