Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > setenv: Syntax Error

setenv: Syntax Error
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 9, 2004, 01:46 PM
 
To make a long story short, I was trying to install something (QEMU or some molecular biology software, I can't remember) which required some interaction with the Terminal. I never did get it to install but now I get this message when I open Terminal.app:

Welcome to Darwin!
tcsh: setenv: Syntax Error.

Any idea what I did here and how to rectify the problem?

Thanks
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Aug 9, 2004, 09:04 PM
 
Originally posted by bierslayer:
To make a long story short, I was trying to install something (QEMU or some molecular biology software, I can't remember) which required some interaction with the Terminal. I never did get it to install but now I get this message when I open Terminal.app:

Welcome to Darwin!
tcsh: setenv: Syntax Error.

Any idea what I did here and how to rectify the problem?

Thanks
Yep, usually you can check the .tcshrc and .login files in your home directory, these files get run when you launch a new shell and are used for setting up the environment for the shell (variables, paths, settings). Use the Terminal to invoke the "pico" editor to edit these files... or if you don't feel comfortable try a command such as: open .tcshrc which will open the file in TextEdit and allow you to edit and save from there. Look for lines containing "setenv" commands.

"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Aug 9, 2004, 09:46 PM
 
Or .bashrc/.profile/.bash_profile if you are using 10.3.

Craig
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Aug 10, 2004, 12:03 AM
 
I think he's using tcsh, not bash.

hint: tcsh: setenv: Syntax Error.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Aug 10, 2004, 07:23 AM
 
oops. Note to self:..work on reading more slowly!
C-
(Last edited by suthercd; Aug 10, 2004 at 02:38 PM. )
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 10, 2004, 12:06 PM
 
Okay....I have to plead ignorance here. I'm not well versed in the use of the Terminal. I'm not sure how to find/open the .tcshrc or .login files. Also, what edits would I make to those files ? Thanks for your help folks!
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Aug 10, 2004, 12:23 PM
 
do yourself a favor and just type:

grep -r setenv *

and see what it returns rather than poking around for files that may or may not exist.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 10, 2004, 01:36 PM
 
Holy moly! I get a huge pile of text scrolling by and at the end it tells me:

grep: db: No such file or directory
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Aug 10, 2004, 03:01 PM
 
Open the Terminal. Enter 'ls -al | more' without the single quotes. The '|' (pipe) is shift-\ on my keyboard. This will list the files in your Home (Users/yourname) directory, one screen at a time. Terminal by defualt opens with its working directory as the Home directory. Use the space-bar to display the next screen.

When your prompt returns you have viewed a list of all the files and folders in your Home directory. If you have a .tcshrc file, it will have been listed. If it is there, the advice given by [API] should do what you need. If you get stuck, just ask again.

Craig
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Aug 10, 2004, 03:11 PM
 
type this:

grep -c setenv *

then wait for the results (could be a while)

if you don't get anything, then do it recursively:

grep -c -r setenv *
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 11, 2004, 03:55 PM
 
Okay, I tried 'ls -al | more' and I don't see a .tcshrc or .login file. I do see a .cshrc though. When I try 'grep -c setenv *' I get a bunch of "Operation not permitted" lines and "grep: db: No such file or directory" at the end.

When I type "grep -c -r setenv *" I get:

grep: db: No such file or directory

??????
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Aug 13, 2004, 12:38 PM
 
Originally posted by bierslayer:
Okay, I tried 'ls -al | more' and I don't see a .tcshrc or .login file. I do see a .cshrc though. When I try 'grep -c setenv *' I get a bunch of "Operation not permitted" lines and "grep: db: No such file or directory" at the end.

When I type "grep -c -r setenv *" I get:

grep: db: No such file or directory

??????
Are you running this from your home directory or the root directory?
It sounds like the root directory, so do a:

cd ~

first, then run that command.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 16, 2004, 12:06 PM
 
I'm definitely not running from root. However, I did as you suggest and still get the "no such file" message. May I ask what one would expect to see when running this command?

Thanks for your time.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:30 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2