#how to use path?/how to install zig?
1 messages · Page 1 of 1 (latest)
Open another terminal and see if the zig command worked
uhhnope
what is inside of the directory you tried to add to your path. Does zig the binary have executable permissions?
ls -l will show the permissions
opening a new terminal wont inherit the modification you made to your path
I didn't see you added it to your bashrc originally that should make it work in a new terminal
here's the directory, here's ls -l, but idk how to check the binary permissions
i meant ls -l inside of that extracted zig path it will show the binary permissions
does this work?
does running zig inside of that directory work?
I assume the problem is that ~/ is not getting expanded in how your added zig to your path
as in ./zig to run the file, zig on its own will still search the path and will still probably fail
tried this
looks promising but idk about that error lol 😭
good, at least we know its not an issue with zig itself
you have ~/home/lucia which would technically expand to/home/lucia/home/lucia
and in the second $HOME/.. you're missing the Downloads directoryy
I assume the problem is that ~/ is not getting expanded in how your added zig to your path
when adding to your path use/home/lucia/Downloads/<keep-going>the path is not getting expanded
or that above, bash can be a bit weird on when it chooses to expand paths its generally simpler to use the full path
but yes, use full path
looking at what you originally added to path ~/home is incorrect, the resolves to /home/home.
and your seccond attempt, whihc you added to bashrc, is also incorrect, assuming you didnt move the zig folder out of your downloads?
nope didn't move it from downloads at all
type pwd in the zig extracted directory and use that in PATH
right, so in your bashrc, just add /Downloads between $HOME and /zig-...
and it should work, will have to restart your terminal, or just copy and run the export command.
didn't work?
I'll try what vei said though hold on
; -> :, don't include the ~
also ~/home/lucia is not correct like noted above that turns into /home/lucia/home/lucia if its expanded
sorry went on a detour to try out vei's idea
mising closing '
this is fun :)
so it thought you wanted to continue on a new line
also you'd want to make sure you include the current path, so you dont overwrite it and make your shell unusable
PATH=$PATH:....
thanks for catching that, heres what i got after
oh lemme try what u just said too
where the >> ~/.bashrc XD
remove the echo and enclosing ''.
if it works, then copy it into your ~/.bashrc using a text editor, so you can remove the one you added previously, and also so you dont accidentally overwrite the whole file incase anything else is in there
oh I had opened a new tab cause I thought that was a bug or something 😭lemme go back
thouight i had messed up
you should probably go find some introduction to using a terminal/bash on linux
so you can understand what you are doing, and not just run what strangers on the internet tell you
nah, I am bored anyway :3
You could also try checking the value of PATH when it doesn't work, and look for problems:
echo $PATH
then edit your ~/.bashrc if needed