Southclaws / sampctl

The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
GNU General Public License v3.0
241 stars 33 forks source link

Odd problem after reinstalling linux #437

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, I had some problems with my Linux (PC) freezing so I decided to reinstall it, now I am having this problem:

[sage@sage-pc SAMP]$ sampctl p install pBlueG/SA-MP-MySQL:R41-4
INFO: Package does not have any tags, consider versioning your code with: `sampctl package release`
ERROR: Failed to clone the repo

As you can see, it says that it failed to clone the repo.

Now, I tried running sampctl as root and woah, it worked.

sage@sage-pc SAMP]$ sudo sampctl p install pBlueG/SA-MP-MySQL:R41-4
INFO: sage-sys/gamemode successfully ensured dependency files for github.com/pBlueG/SA-MP-MySQL:R41-4
INFO: successfully added new dependency

Anyone having any ideas? Why do I need to run sudo sampctl instead of sampctl after I reinstalled my OS with basically the same .iso file and installer settings?

I installed sampctl the same way I did it before the new os - yay sampctl

OS:

sage@sage-pc
OS: Manjaro 21.0.5 Ornara
Kernel: x86_64 Linux 5.10.36-2-MANJARO
Uptime: 22m
Packages: 1080
Shell: bash 5.1.8
Resolution: 1920x1080
DE: Xfce4
WM: Xfwm4

EDIT: OK. I ran chmod and I believe that I can run commands without sudo from the terminal but the sublime is not working anymore:

INFO: Package does not have any tags, consider versioning your code with: `sampctl package release`
failed to compile package entry: signal: segmentation fault (core dumped)
[Finished in 2ms with exit code 1]
[cmd: ['sampctl', 'package', 'build']]
[dir: /home/sage/SAMP]
[path: /home/sage/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin]
ADRFranklin commented 3 years ago

Clearly you have not given it permission to clone the repositories to your .samp folder. Somehow it doesn't have write permissions. Running sudo is not needed, though I've never tested it on Arch, though another user has and it worked for him without sudo.

As both an Ubuntu user, I can't say I've ever had issues with permissions, though if I had, I would always check the app had the permissions to read/write in the first place, as this ends up being 90% of issues with package managers.

ghost commented 3 years ago

I actually think my Manjaro installation fucked up the non-root user because I had to run passwd on non-root user even tho it was the same password as root one...i'll have to reinstall again :D

EDIT: Yeah, it was a faulty manjaro installation, lol, closing this