Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Morgan Mac

macrumors regular
Original poster
Jul 24, 2011
111
3
Hello,

I'm not that familiar with using the Terminal, but every now and then I mess around with the command-line to make some adjustments to the computer. A few months ago, I began noticing typing some commands (like 'sudo') into the Terminal stopped working. Now, whenever I open Terminal, a heading of text appears:

export: `Archiver/B1FreeArchiver.app/Contents/MacOS:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin': not a valid identifier​

I have no idea what this means. I downloaded B1 Free Archiver sometime a few months ago, that seems to be the problem.

Anyway, the text is clutter, and I'm not sure how to get rid of it. Some commands don't seem to work anymore, and that's a real problem. Is there a method you can explain to me clearly that will reset the Terminal app to it's default state? I don't wish to do a clean install of the operating system.
 

Attachments

  • terminal.png
    terminal.png
    31.5 KB · Views: 381

Morgan Mac

macrumors regular
Original poster
Jul 24, 2011
111
3
The operating system is 10.9.5.
Typing in the command correctly, the response is;
Code:
-bash: ls: command not found
 

2984839

Cancelled
Apr 19, 2014
2,114
2,240
Sounds like your PATH is messed up. Post the output of this command

Code:
/bin/echo $PATH

edit: nevermind, I didn't read the OP thoroughly. Looks like your $PATH is in the output and the new archiver added a line to it. Delete that line from $PATH and see what happens
 

Morgan Mac

macrumors regular
Original poster
Jul 24, 2011
111
3
Thanks, that was informative.

Try this, again pasting the complete output inside CODE tags:
Code:
/bin/ls -la ~

Code:
total 112
drwxr-xr-x+ 51 morganstack  staff  1734  5 Jan 13:34 .
drwxr-xr-x  5 root  admin  170 16 Dec  2014 ..
-rw-------  1 morganstack  staff  3 16 Dec  2014 .CFUserTextEncoding
-rw-r--r--@  1 morganstack  staff  24580  5 Jan 15:46 .DS_Store
drwx------  2 morganstack  staff  68  5 Jan 19:29 .Trash
-rw-------  1 morganstack  staff  8938  5 Jan 21:45 .bash_history
-rw-r--r--  1 morganstack  staff  249  8 Sep 20:47 .bash_profile
drwxr-xr-x  4 morganstack  staff  136 16 Dec  2014 .cache
drwxr-xr-x  6 morganstack  staff  204 14 Nov 16:27 .config
drwxr-xr-x  32 morganstack  staff  1088  8 Jan  2015 .fontconfig
drwx------  3 morganstack  staff  102  8 Jan  2015 .gconf
drwx------  3 morganstack  staff  102  8 Jan  2015 .gconfd
drwxr-xr-x  3 morganstack  staff  102  8 Jan  2015 .gnome2
drwx------  12 morganstack  staff  408  5 Jan 11:30 .gnupg
drwxr-xr-x  5 morganstack  staff  170  7 Nov 02:33 .idlerc
drwxr-xr-x  3 morganstack  staff  102 16 Dec  2014 .local
drwxr-xr-x  3 morganstack  staff  102 17 Dec  2014 .mplayer
-rw-------  1 morganstack  staff  40  6 Sep 16:29 .python_history
-rw-------  1 morganstack  staff  1024 11 Jul 04:55 .rnd
drwxr-xr-x  3 morganstack  staff  102 30 Sep 19:53 .swt
drwxr-xr-x  4 morganstack  staff  136  7 Aug 16:02 .thumbnails
-rw-r--r--  1 morganstack  staff  982  8 Jan  2015 .xinitrc

Sounds like your PATH is messed up. Post the output of this command

Code:
/bin/echo $PATH

edit: nevermind, I didn't read the OP thoroughly. Looks like your $PATH is in the output and the new archiver added a line to it. Delete that line from $PATH and see what happens

Code:
/Applications/File

Can you be more clear about what you want me to do please?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,780
8,503
A sea of green
OK, now do the following:

1. Paste this command into Terminal:
Code:
/bin/mv ~/.bash_profile ~/broken_profile.txt

2. Quit Terminal.

3. Relaunch Terminal.
Confirm that the error message no longer appears, and the following command works:
Code:
ls -la ~

4. If the command works, then open "broken_profile.txt" in TextEdit, and copy and paste its entire contents here, inside CODE tags.

After seeing the contents of the broken profile, I can tell you how to make a corrected version of that file. I'm pretty sure I know what the erroneous line will be, but I need to see the rest of the file in order to provide a complete correct profile.
 

Morgan Mac

macrumors regular
Original poster
Jul 24, 2011
111
3
OK, now do the following:

1. Paste this command into Terminal:
Code:
/bin/mv ~/.bash_profile ~/broken_profile.txt

2. Quit Terminal.

3. Relaunch Terminal.
Confirm that the error message no longer appears, and the following command works:
Code:
ls -la ~

4. If the command works, then open "broken_profile.txt" in TextEdit, and copy and paste its entire contents here, inside CODE tags.

After seeing the contents of the broken profile, I can tell you how to make a corrected version of that file. I'm pretty sure I know what the erroneous line will be, but I need to see the rest of the file in order to provide a complete correct profile.

So far, so good.

Code:
# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH

export PATH=/Applications/File Archiver/B1FreeArchiver.app/Contents/MacOS:$PATH
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,572
6,083
Do you care about/want the B1 Archiver? I would just nix the last line of .broken_profile and change its name back to .bash_profile.
 
  • Like
Reactions: Weaselboy

chrfr

macrumors G5
Jul 11, 2009
13,548
7,075
I would do what @ArtOfWarfare suggests then. The problem is that the last line has a space in it, which means it gets cut off after "File". This sets your $PATH variable to just "/Applications/File" which doesn't exist.
Additionally, PATH is defined twice so that's also confusing matters. But yes, deleting that last line and moving the profile back will solve the problem.
 
  • Like
Reactions: Weaselboy

Morgan Mac

macrumors regular
Original poster
Jul 24, 2011
111
3
I would do what @ArtOfWarfare suggests then. The problem is that the last line has a space in it, which means it gets cut off after "File". This sets your $PATH variable to just "/Applications/File" which doesn't exist.

I appreciate guiding me through the solution. Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.