0

I downloaded something out of the Internet and executed it, which might could have malware. After that I deleted all of that and i opened my Terminal and it gave me this error:

/Users/flawn/.zshrc:.:1: no such file or directory: /usr/local /etc/profile.d/z.sh
flawn@osx: ~|master⚡ ⇒  open .zshrc

These files exist and i could open it . I also tried to chmod all Files, but it didnt fix it. My fear is, that my system might not boot because of that permission errors...

Greetings

  • Look in ~/.zsh - you more than likely have some sort of command in there. Post to contents so we can review, but most likely, it would be at the end. Comment it out or delete it. – Allan Sep 3 '17 at 10:03
  • Are the lines of .zshrc numbered? Lines in a shell rc file should not be numbered. – fd0 Sep 3 '17 at 10:07
  • hastebin.com/wigurohaha.bash – NightScap3 Sep 3 '17 at 10:20
  • I cant even do $PATH... zsh: no such file or directory: /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands EDIT: It works but wtf again zsh: no such file or directory – NightScap3 Sep 3 '17 at 10:27
  • You have changed the prompt to call a script that is not there. Look at .zshenv and .zshrc etc – Mark Sep 5 '17 at 2:45
1

The error message- /Users/flawn/.zshrc:.:1: no such file or directory: /usr/local /etc/profile.d/z.sh comes from line 1 of your .zshrc file and suggests that there is a space between the command substitution and the rest of the path-

 . `brew --prefix` /etc/profile.d/z.sh
                  ^space

Back ticks for command substitution have been deprecated for a long time in favor of $(.....) but you would be better off using the absolute path to the sourced file-

. /usr/local/etc/profile.d/z.sh 

or comment line 1 out if z is not installed.

#. `brew --prefix` /etc/profile.d/z.sh

In line 20 remove the curly quotes-

DISABLE_UPDATE_PROMPT=„true“

Last, terminate the last line of your .zshrc file with a newline.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .