Prezto: failed to create symbolic Error

Created on 14 Nov 2012  路  11Comments  路  Source: sorin-ionescu/prezto

Hi, I'm trying to Create a new Zsh configuration by copying the Zsh configuration files provided. However I get this error?

ln: failed to create symbolic link `/home/ans/.zlogin': File exists
ln: failed to create symbolic link `/home/ans/.zlogout': File exists
ln: failed to create symbolic link `/home/ans/.zpreztorc': File exists
ln: failed to create symbolic link `/home/ans/.zprofile': File exists
ln: failed to create symbolic link `/home/ans/.zshenv': File exists
ln: failed to create symbolic link `/home/ans/.zshrc': File exists
Discussion

Most helpful comment

@Alghamdi it is not stupid at all, the readme does not explain what you should do with it, and it should.

All 11 comments

Well, as stated in the output, it failed, because the files already exists.

If you already have these files they can't just be replaced (especially if you have some custom configuration in those).
Delete them and try again.

So I can't keep any of my customisation? even the ones I made to .zshrc ?

If you want to keep your customisations you will have to merge them manually.

Move your previous Zsh installation to a backup directory then follow the Prezto installation instructions word for word.

P.S. Sorry if this sound stupite: How actually we should get this run?

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

what I did is copying it to my .zshrc then just do exec $SHELL. Because everytime I try running it as a .sh script I get:

./p.sh: 1: ./p.sh: setopt: not found
./p.sh: 2: ./p.sh: Syntax error: "(" unexpected

@Alghamdi it is not stupid at all, the readme does not explain what you should do with it, and it should.

Replace ln with ln -f to overwrite existing files.

@alimoeeny thanks for bringing this back to life ;).
@sorin-ionescu thanks for this great piece of code, since 2012 I've been using it for every single machine I have access to, and since then I now know how to get it to work, how to branch it, how to commit my changes and how to update it :). Perhaps adding such guid for newbies would save lots some hassles.

:+1: Thanks

Just reiterating what @alimoeeny said, I was confused where to create a new zsh config as referred to in Step 3 of installation. Felt like the README.md was missing something.

We'd be open to PRs with clarification and improvement... Or even more concrete suggestions. It's sometimes hard to see what the best way to make it more accessible is when you're so used to how it works, so a fresh set of eyes might be best.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EllieRagone picture EllieRagone  路  4Comments

hiqua picture hiqua  路  6Comments

gdetrez picture gdetrez  路  5Comments

daiyanze picture daiyanze  路  4Comments

aliostad picture aliostad  路  4Comments