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

Installation problem - Cannot create directory ‘/tmp/first-gitpack/1000/’: File exists #15

Open
danee940 opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@danee940
Copy link

danee940 commented Oct 3, 2024

Environment
Fedora Linux 41 (KDE Plasma)
Linux 6.11.0-63.fc41.x86_64
ASUS Zenbook 14 UX3405MA

Steps

❯ wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh

installing GitPack locally
mkdir: cannot create directory ‘/tmp/first-gitpack/1000/’: File exists

❯ sudo rm -rf /tmp/first-gitpack/

❯ wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh

installing GitPack locally
cat: /var/lock/gitpack-1000.lock/pid: No such file or directory
E17: gitpack-1000.lock was acquired by another process 
if the problem persists, try rebooting

❯ sudo rm -rf /var/lock/gitpack-1000.lock

❯ wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh

installing GitPack locally
mkdir: cannot create directory ‘/tmp/first-gitpack/1000/’: File exists

I tried removing the mentioned directory, but without any success. Rebooting also didn't help.

@danee940 danee940 added the bug Something isn't working label Oct 3, 2024
@adil192
Copy link

adil192 commented Nov 25, 2024

I found a workaround. Idk which parts of it are necessary

# If you've run the script before, clean up
rm -rf /tmp/first-gitpack/

# Create the folder which will contain the lock file
sudo mkdir -p /var/lock/gitpack-1000.lock/

# Run the script with sudo
wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sudo sh

My system: Fedora 41 (Gnome) with Linux 6.11.7-666.rog.fc41.x86_64

@dominiksalvet
Copy link
Owner

Hello @danee940 and @adil192, sorry for my late reply -- I was quite busy recently.

However, I can confirm this bug as I also saw it recently. The issue seems to be in the /var/lock permissions of some systems. In some systems, it does not allow non-root users to create files there -- the solution is to use /tmp instead as this seems to be safe for use on all systems even for non-root users.

This fix is already incorporated in GitPack version 1.2.0. So, if you are affected by this issue and already have GitPack installed using the workaround, please uninstall GitPack first. In any case, reboot the system and try installing GitPack again using the same approach.

For everyone else, simple gitpack install github.com/dominiksalvet/gitpack or sudo gitpack install github.com/dominiksalvet/gitpack will update GitPack as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants