zsh Terminal "Error: unknown command: shellanv"

C

C8rkB8llw3rk

Registriert
Thread Starter
Dabei seit
31.01.2022
Beiträge
4
Reaktionspunkte
0
Hallo liebe MacUser,
ich hoffe Ihr könnt mir helfen:
O.g. Fehler erscheint immer wenn ich mein Terminal starte. Wie kann ich diesen beseitigen?

Ich habe echt viel gegoogelt aber noch nix gefunden. Ich bin absoluter Neuling aber wollte mich dem Thema Python Programmierung nähern. Denke bei Installationen wie Homebrew und Co ist der Fehler entstanden.

Bei der Frage gleich noch eine weitere: Weiss jemand Quellen für eine gute Einführung ins Terminal? Ich konsumiere alles: Bücher, Videos, Blogs, egal was... hab bloß keine Lust mehr einen auf James Dean aus dem Film "Denn Sie wissen nicht was Sie tun" zu machen ;)

Vielen Dank für eure Unterstützung

EtreCheckPro version: 6.5.6 (6F041)

Report generated: 2022-01-31 21:15:48

Download EtreCheckPro from https://etrecheck.com

Runtime: 2:15


Performance: Excellent

Problem:
No problem - just checking

Description:

Error unknown command


Major Issues: None

Minor Issues:

These issues do not need immediate attention but they may indicate future problems or opportunities for improvement.


No Time Machine backup - Time Machine backup not found.

Unsigned files - There are unsigned software files installed. Apple has said that unsigned software will not run by default in a future version of the operating system.

x86-only Apps - This computer has x86-only apps might not work on future versions of the operating system.

Limited drive access - More information may be available with Full Drive Access.


Hardware Information:
MacBook Air (M1, 2020)
MacBook Air Model: MacBookAir10,1
2.40 GHz Apple M1 (m1) CPU: 8-core
8 GB RAM - Not upgradeable
Battery: Health = Normal - Cycle count = 30

Video Information:
Apple M1
Color LCD (built-in) 2880 x 1800

Drives:
disk0 - APPLE SSD AP0256Q 251.00 GB (Solid State - TRIM: Yes)
Internal Apple Fabric NVM Express
disk0s1 [APFS Container] 524 MB
disk1 [APFS Virtual drive] 524 MB (Shared by 4 volumes)
disk1s1 - iSCPreboot (APFS) [APFS Preboot] (Shared - 8 MB used)
disk1s2 - xART (APFS) (Shared - 6 MB used)
disk1s3 - Hardware (APFS) (Shared - 639 KB used)
disk1s4 - Recovery (APFS) [Recovery] (Shared - 20 KB used)
disk0s2 [APFS Container] 245.11 GB
disk3 [APFS Virtual drive] 245.11 GB (Shared by 6 volumes)
disk3s1 (APFS) [APFS Container] (Shared - 15.75 GB used)
disk3s1s1 - Macintosh HD (APFS) [APFS Snapshot] (Shared - 15.75 GB used)
disk3s2 - Preboot (APFS) [APFS Preboot] (Shared - 493 MB used)
disk3s3 - Recovery (APFS) [Recovery] (Shared - 845 MB used)
disk3s4 - Update (APFS) (Shared - 6 MB used)
disk3s5 - Data (APFS) [APFS Virtual drive] (Shared - 90.32 GB used)
disk3s6 - VM (APFS) [APFS VM] (Shared - 1.07 GB used)
disk0s3 [APFS Container] 5.37 GB
disk2 [APFS Virtual drive] 5.37 GB (Shared by 2 volumes)
disk2s1 - Recovery (APFS) [Recovery] (Shared - 856 MB used)
disk2s2 - Update (APFS) (Shared - 29 KB used)

Mounted Volumes:
disk1s1 - iSCPreboot [APFS Preboot]
524 MB (Shared - 8 MB used, 505 MB free)
APFS
Mount point: /System/Volumes/iSCPreboot
disk1s2 - xART
524 MB (Shared - 6 MB used, 505 MB free)
APFS
Mount point: /System/Volumes/xarts
disk1s3 - Hardware
524 MB (Shared - 639 KB used, 505 MB free)
APFS
Mount point: /System/Volumes/Hardware
disk3s1s1 - Macintosh HD [APFS Snapshot]
245.11 GB (Shared - 15.75 GB used, 163.15 GB available, 136.48 GB free)
APFS
Mount point: /
Read-only: Yes
disk3s2 - Preboot [APFS Preboot]
245.11 GB (Shared - 493 MB used, 136.48 GB free)
APFS
Mount point: /System/Volumes/Preboot
disk3s3 - Recovery [Recovery]
245.11 GB (Shared - 845 MB used, 136.48 GB free)
APFS
Mount point: /Volumes/Recovery
disk3s4 - Update
245.11 GB (Shared - 6 MB used, 136.48 GB free)
APFS
Mount point: /System/Volumes/Update
disk3s5 - Data [APFS Virtual drive]
245.11 GB (Shared - 90.32 GB used, 163.15 GB available, 136.48 GB free)
APFS
Mount point: /System/Volumes/Data
Encrypted
disk3s6 - VM [APFS VM]
245.11 GB (Shared - 1.07 GB used, 136.48 GB free)
APFS
Mount point: /System/Volumes/VM

Network:
Interface en4: Ethernet Adapter (en4)
Interface en3: Ethernet Adapter (en3)
Interface bridge0: Thunderbolt Bridge
Interface en0: Wi-Fi
802.11 a/b/g/n/ac/ax

System Software:
macOS Monterey 12.1 (21C52)
Time since boot: About 6 days

Notifications:

Google Chrome Helper (Alerts).app

5 notifications


Security:
Gatekeeper: App Store and identified developers

System Integrity Protection: Enabled


Antivirus software: Apple


Unsigned Files:
Apps: 2

Old Applications:
13 x86-only apps

System Launch Daemons:
[Not Loaded] 42 Apple tasks

[Loaded] 216 Apple tasks

[Running] 117 Apple tasks

[Other] One Apple task


System Launch Agents:
[Not Loaded] 16 Apple tasks

[Loaded] 188 Apple tasks

[Running] 145 Apple tasks

[Other] One Apple task


Launch Daemons:
[Loaded] com.microsoft.autoupdate.helper.plist (Microsoft Corporation - installed 2022-01-13)

[Loaded] com.microsoft.teams.TeamsUpdaterDaemon.plist (Microsoft Corporation - installed 2021-09-20)

[Loaded] com.teamviewer.Helper.plist (TeamViewer GmbH - installed 2021-06-06)

[Not Loaded] com.teamviewer.teamviewer_service.plist (TeamViewer GmbH - installed 2021-05-28)


Launch Agents:
[Loaded] com.microsoft.update.agent.plist (Microsoft Corporation - installed 2022-01-13)

[Not Loaded] com.teamviewer.teamviewer.plist (TeamViewer GmbH - installed 2021-05-28)

[Not Loaded] com.teamviewer.teamviewer_desktop.plist (TeamViewer GmbH - installed 2021-05-28)


User Launch Agents:
[Loaded] com.google.keystone.agent.plist (Google, Inc. - installed 2021-11-26)

[Loaded] com.google.keystone.xpcservice.plist (Google, Inc. - installed 2021-11-26)

[Running] com.jetbrains.toolbox.plist (JetBrains s.r.o. - installed 2022-01-25)


User Login Items:
[Not Loaded] MindNode Helper (App Store - installed 2022-01-23)
Modern Login Item
/Applications/MindNode.app/Contents/Library/LoginItems/MindNode Helper.app
[Not Loaded] Launcher Disabler (App Store - installed 2022-01-23)
Modern Login Item
/Applications/OneDrive.app/Contents/Library/LoginItems/Launcher Disabler.app
[Not Loaded] OneDrive Launcher (App Store - installed 2022-01-23)
Modern Login Item
/Applications/OneDrive.app/Contents/Library/LoginItems/OneDrive Launcher.app
[Loaded] RectangleLauncher (Ryan Hanson - installed 2021-07-03)
Modern Login Item
/Applications/Rectangle.app/Contents/Library/LoginItems/RectangleLauncher.app
[Loaded] StartUpHelper (Spotify - installed 2021-10-27)
Modern Login Item
/Applications/Spotify.app/Contents/Library/LoginItems/StartUpHelper.app
[Not Loaded] TeamViewerMeetingLoginItem (TeamViewer GmbH - installed 2021-06-06)
Modern Login Item
/Applications/TeamViewer.app/Contents/Library/LoginItems/TeamViewerMeetingLoginItem.app
[Not Loaded] WhatsApp Login Helper (App Store - installed 2022-01-23)
Modern Login Item
/Applications/WhatsApp.app/Contents/Library/LoginItems/WhatsApp Login Helper.app

Audio Plug-ins:
TVRemoteAudio: 1.0.1 (TeamViewer GmbH - installed 2021-05-28)

Backup:
Time Machine information not available without Full Drive Access.

Performance:

System Load: 2.30 (1 min ago) 2.07 (5 min ago) 2.81 (15 min ago)
Nominal I/O speed: 1.40 MB/s
File system: 10.70 seconds
Write speed: 2079 MB/s
Read speed: 2166 MB/s

CPU Usage Snapshot:
Type Overall

System: 4 %

User: 9 %

Idle: 86 %


Top Processes Snapshot by CPU:
Process (count) CPU (Source - Location)

EtreCheckPro 28.14 % (Etresoft, Inc.)

Spotify Helper (GPU) 22.66 % (Spotify)

WindowServer 21.94 % (Apple)

kernel_task 9.07 % (Apple)

Spotify Helper (Renderer) 8.14 % (Spotify)


Top Processes Snapshot by Memory:
Process (count) RAM usage (Source - Location)

com.apple.WebKit.WebContent (21) 539 MB (Apple)

EtreCheckPro 307 MB (Etresoft, Inc.)

AppleSpell (2) 206 MB (Apple)

Google Chrome Helper (Renderer) (7) 128 MB (Google, Inc.)

MTLCompilerService (27) 116 MB (Apple)


Top Processes Snapshot by Network Use:
Process Input / Output (Source - Location)

mDNSResponder 51 MB / 48 MB (Apple)

Spotify 35 MB / 814 KB (Spotify)

com.apple.WebKit.Networking 6 MB / 763 KB (Apple)

trustd 37 KB / 3 KB (Apple)

netbiosd 10 KB / 7 KB (Apple)


Top Processes Snapshot by Energy Use:
Process (count) Energy (0-100) (Source - Location)

Spotify Helper (GPU) 11 (Spotify)

WindowServer 9 (Apple)

Spotify Helper (Renderer) 4 (Spotify)

pycharm 2 (JetBrains s.r.o.)

Spotify 1 (Spotify)


Virtual Memory Information:
Physical RAM: 8 GB


Free RAM: 16 MB

Used RAM: 7.61 GB

Cached files: 379 MB


Available RAM: 394 MB

Swap Used: 46 MB


Software Installs (past 60 days):
Install Date Name (Version)

2021-12-17 Core Services Application Configuration Data 12.0 (120.73)

2021-12-17 GarageBand (10.4.5)

2021-12-29 Command Line Tools for Xcode (13.2)

2021-12-29 Python (0)

2022-01-08 Momentum (2.4.50)

2022-01-08 Telegram (8.4.1)

2022-01-12 Spark (2.11.10)

2022-01-12 tiptoi Manager (1.0.0)

2022-01-13 Microsoft AutoUpdate (4.43.22011101)

2022-01-15 Anaconda3

2022-01-23 Microsoft To Do (2.62)

2022-01-23 PocketTube (11.0.9)

2022-01-23 WhatsApp (2.2149.4)

2022-01-23 OneDrive (21.245.1128)

2022-01-23 MindNode (2022.0.1)

2022-01-25 macOS 12.1 (12.1)

2022-01-25 RosettaUpdateAuto (1.0.0.0.1.1638929307)

2022-01-25 MRTConfigData (1.86)

2022-01-27 XProtectPlistConfigData (2154)


Diagnostics Information (past 7-30 days):
2022-01-26 00:21:20 signpost_reporter - High CPU Use
Executable: /usr/libexec/signpost_reporter
2022-01-25 19:16:00 bluetoothd - Crash
Executable: /usr/sbin/bluetoothd

End of report
 
Ich würde als Standardtest mal das Terminal unter einem neuen "nackten" Benutzer testen.
Und mir mal die diversen Einstellungen für das Terminal anschauen, ob da vielleicht versehentlich irgendein Befehl für den Start eingetragen ist.
Kannst du nach dieser Meldung normal weiterarbeiten?

Ich könnte mir vorstellen, daß der Befehl eine Kurzform sein könnte für "shell environment" - bin aber eher Terminal-Dilletant als kompetenter Benutzer.

Edit: Sorry, ich hatte "shellenv" gelesen. "shellanv" klingt jetzt nicht so nach "environment".
 
Tippfehler im Shell rc?
 
Bei zsh ist das dann vermutlich
Code:
~/.zshrc
Auf den aktuellen macOS Systemen ist
Code:
/etc/zshrc
bzw
Code:
/System/Volumes/Data/private/etc/zshrc
ja eigentlich gegen Veränderungen geschützt.
 
Wie schon über mir angedeutet. Öffne mal ein Terminal und gebe cat ~/.zshrc ein und zeige hier die Ausgabe. Eventuell steht da was Fehlerhaftes drin.
 
  • Gefällt mir
Reaktionen: C8rkB8llw3rk
Weiss jemand Quellen für eine gute Einführung ins Terminal? Ich konsumiere alles: Bücher, Videos, Blogs, egal was...

Zu aller erst mal: Terminal.app ist ein Programm, dass dir in einem Fenster eine Shell anbietet. Bei all deinen Suchen nach Infos, suche also nach "Shell", "Shell Programmierung" und so.

Die zsh = z Shell ist eine Alterantive zur bash = Bourne Again Shell. Da die zsh (die nun standardmäßig auf macOS aktiv ist) kompatibel zur bash ist, kannst du auch mit der Bash lernen. Das daher, da Linux die bash nutzt und für die bash unzählige Bücher existieren.

Die Befehle die du innerhalb der zsh / bash ausführen kannst, sind aber nur zu einem kleinen Teil auch eine Komponente der jeweiligen Shell, sondern es sind kleine Programme, die vom jeweiligen Betriebssystem mitgeliefert werden. Ein gewisser Grundumfang ist in den meisten Systemen (macOS, BSD, Linux) ähnlich.

Die konkret für dein System = macOS vorhandenen Befehle und "Befehlsprogramme" musst du dir aber selbst erschließen, wenn du die Grundlagen kennst.

Nun hast du die ersten Infos um dir Lernmaterial für die Grundlagen, nicht für die zsh und nicht für den konkreten Befehlsumfang von macOS, zu suchen, wie das z.B.

https://www.oreilly.com/library/view/einfuhrung-in-die/9783897214248/

https://openbook.rheinwerk-verlag.de/shell_programmierung/shell_003_000.htm
 
  • Gefällt mir
Reaktionen: Macschrauber, C8rkB8llw3rk, Hans-Ulrich und 2 andere
Wie schon über mir angedeutet. Öffne mal ein Terminal und gebe cat ~/.zshrc ein und zeige hier die Ausgabe. Eventuell steht da was Fehlerhaftes drin.
Bash:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/mwally/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/mwally/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/mwally/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/mwally/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

eval "$(pyenv init -)"
eval "$(pyenv init -)"
eval "$(pyenv init -)"

Ich hoffe ich hab das so richtig wiedergegeben. Durch meine Unwissenheit und Ungeduld hab ich ziemlich viel Mist gemacht glaub ich... Ich hab jetzt gesehen dass ich ein Hard Reset machen kann. Das hab ich dann auch gemacht. Der Fehler ist weg... dafür kamen ein paar Neue hinzu :rolleyes:

Bash:
/Users/mwally/.zprofile:1: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:2: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:3: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:4: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:5: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:11: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:12: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:13: no such file or directory: /opt/homebrew/bin/brew
/Users/mwally/.zprofile:19: command not found: pyenv
/Users/mwally/.zprofile:20: command not found: pyenv
/Users/mwally/.zprofile:21: command not found: pyenv
/Users/mwally/.zprofile:22: command not found: pyenv
/Users/mwally/.zshrc:17: command not found: pyenv
/Users/mwally/.zshrc:18: command not found: pyenv
/Users/mwally/.zshrc:19: command not found: pyenv

:eek: Nochmals vielen Dank für die Tipps mit Büchern und Ratschlägen
 
Hm ... in der .zprofile und .zshrc hat es durch deine Installationsversuche Einträge geschrieben, welche die obigen Fehler werfen.

Du hast über Homebrew versucht Python zu installieren und dies in den Konfigdatei mehrfach zu konfigurieren. Deswegen steht bspw. eval "$(pyenv init -)" mehrfach drin, wobei eine Zeile wohl reichen müsste.

Ich habe keine Ahnung, wie das Chaos in den Konfigdateien entstanden ist. Habe selbst zwar auch Python über Homebrew installiert, aber da wurde nichts von mir extra in den Konfigdateien angepasst bzw. war für meine Belange zum Ausführen von Python in Terminal nicht nötig.

Meine Idee wäre die Konfigdateien zu bereinigen und dann noch mal Schritt für Schritt Python zu installieren.

Sehe gerade /opt/homebrew/bin, deutet auf Homebrew unter einen M1 Mac hin. Falls es hier im Bezug auf Python Besonderheiten gibt, bin ich noch unerfahren.
 
  • Gefällt mir
Reaktionen: C8rkB8llw3rk und dg2rbf
Meine Idee wäre die Konfigdateien zu bereinigen und dann noch mal Schritt für Schritt Python zu installieren.
Puuuh ich hab es geschafft... war für mich nicht leicht weil ich erstmal herausfinden musste wie ich meine Konfigdateien bereinige :-D hab es über nano gelöst. (weiss nicht ob es noch andere Wege gibt?)

Ich deinstalliere jetzt erstmal diverse Python Versionen. Ich hab nämlich andauernd Probleme bei PyCharm mit Pakete installieren.
Gibt es was zu beachten um Python komplett zu deinstallieren?

Danke nochmal an alle. Vor allem @tigion
 
Eine weitere Alternative wäre Nix: https://nixos.org/guides/dev-environment.html
Hier wird nix-shell als "virtualenv auf Steroide" benutzt, da man darüber eine komplette Umgebung mit unterschiedlichsten Tools/Libs/Sprachen zu bauen – jeweils pro Projekt.

Das nette ist: dadurch wird das Projekt auch wirklich portabel, da sichergestellt ist, daß exakt das installiert ist, was benötigt wird. Es mag auf dem ersten Blick nervig wirken, aber das ist die eigentliche Stärke dabei: Die Umgebung enthält ausschliesslich das, was in dem Nix-File spezifiziert ist. Das verhindert, daß das Projekt bei dir funktioniert, aber bei anderen nicht, weil DU etwas installiert hattest, was implizit im Environment genutzt werden kann.
 
  • Gefällt mir
Reaktionen: C8rkB8llw3rk und ruerueka
Zurück
Oben Unten