Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
Old 02-06-2002, 08:09 PM   #1
macubergeek
Major Leaguer
 
Join Date: Jan 2002
Location: Gaithersburg, MD
Posts: 494
fink error message

I installed fink
I added this line to the end of my .tcshrc file:
source /sw/bin/init.csh per the fink instructions

but

when I source my .tcshrc file or open a new terminal window I get:
jamesk @ /Users/jamesk@HOME-->source .tcshrc
Badly placed ()'s.
jamesk @ /Users/jamesk@HOME-->

When I delete the line the Badly placed ()'s error goes away.....
so....
I looked at the file /sw/bin/init.csh and found that throughout this file there is a space between every ( and ) and the next or previous charactor.

I tried deleting these spaces and it didn't fix the problem

anyone know what's going on here and how do I fix the problem?
fink works fine otherwise
macubergeek is offline   Reply With Quote
Old 02-06-2002, 09:00 PM   #2
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
i thought the fink instructions were to put the call to init fink into the ~/.cshrc file:

% cat .cshrc
# setup the fink installation

source /sw/bin/init.csh


i think that will initialize fink only once, on your first shell. try that.

the problem is perhaps that some scripts don't like to be run twice. and .tcshrc is run for every shell window.

i've had a lot of trouble with ~/.tcshrc so i removed it and use the
~/library/init/tcsh/*.mine files exclusively.

and liberal use of spaces is not a problem.
mervTormel is offline   Reply With Quote
Old 02-06-2002, 09:09 PM   #3
macubergeek
Major Leaguer
 
Join Date: Jan 2002
Location: Gaithersburg, MD
Posts: 494
dosn't work

Yes you are right and I did try this first, but when I did, it didn't work
I tried this.
I put source /sw/bin/init.csh into ~/.cshrc
but
when I run the command "fink list"
I get
jamesk @ /Users/jamesk@HOME-->fink list

OK? find list? no
fink: Command not found.

this command only works when I add it to ~/.tcshrc

Now everything worked fine for the past week or so and then it stopped working...I swear I didn't change anything.
macubergeek is offline   Reply With Quote
Old 02-06-2002, 09:16 PM   #4
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
curious, could we see the interesting portions of your .tcshrc ?

also, in a new shell window, try

% tcsh -V

and watch for the error. that should show you the code that gaks with the () problem.
mervTormel is offline   Reply With Quote
Old 02-06-2002, 10:17 PM   #5
macubergeek
Major Leaguer
 
Join Date: Jan 2002
Location: Gaithersburg, MD
Posts: 494
.tcshrc file:
set prompt="%{\033[30m%}%n @ %/@HOME-->"
alias p 'ping'
alias wap './wap'
alias tr 'traceroute'
alias ns 'nslookup'
alias e 'exit'
alias if 'ifconfig -a'
alias work 'ssh -l jamesk noclogin1.ash.ops.us.uu.net'
alias c 'clear'
alias gwhois 'whois -h geektools.com'
alias compile 'cp /usr/libexec/config.guess . ;cp /usr/libexec/config.sub .'
alias calc 'awk "BEGIN{ print \!* }"'
source /sw/bin/init.csh
-----------------------------------------------------------------------------------------------
tcsh -V spew:
set path = ( /sw/bin /sw/sbin $path /usr/X11R6/bin )

if ( $?MANPATH ) then
setenv MANPATH /sw/share/man:/sw/man:${MANPATH}:/usr/X11R6/man
else

if ( $?INFOPATH ) then
setenv INFOPATH /sw/share/info:/sw/info:$INFOPATH
else

if ( $?PERL5LIB ) then
setenv PERL5LIB /sw/lib/perl5:$PERL5LIB
else


if ( -d /sw/etc/profile.d ) then
set nonomatch
foreach i ( /sw/etc/profile.d/*.csh )
if ( -x $i ) then
end
unset i nonomatch
endif

if ( $?version ) then
if ( "$version" =~ tcsh* ) then
complete fink 'n/fink/( install remove selfupdate update-all configure list apropos describe --help --version )/'
endif
endif

set PROXYHTTP=`grep ProxyHTTP /sw/etc/fink.conf | grep -v "#" | cut -d " " -f2`

if ( "$PROXYHTTP" != "" ) then

set PROXYFTP=`grep ProxyFTP /sw/etc/fink.conf | grep -v "#" | cut -d " " -f2`

if ( "$PROXYFTP" != "" ) then

eof
eof: Command not found.
[localhost:~] jamesk%
macubergeek is offline   Reply With Quote
Old 02-06-2002, 10:42 PM   #6
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
eof ? kinda a moving target, ain't it?

eyeball the end of that /sw/bin/init.csh

from mine:
...
set PROXYFTP=`grep ProxyFTP /sw/etc/fink.conf | grep -v "#" | cut -d " " -f2`

if ( "$PROXYFTP" != "" ) then
setenv FTP_PROXY $PROXYFTP
setenv ftp_proxy $PROXYFTP
endif

# eof


what does sourcing it directly do?

% source /sw/bin/init.csh


and where's the [ Badly placed ()'s. ] error ?
mervTormel is offline   Reply With Quote
Old 02-07-2002, 01:43 AM   #7
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
.tcshrc or .cshrc ?

Try this:

Remove "source /sw/bin/init.csh " from your .tcshrc file.

Then write in the .tcshrc file :

source ~/.cshrc

Write "source /sw/bin/init.csh " in your .cshrc

Cheers...
sao is offline   Reply With Quote
Old 02-07-2002, 05:38 AM   #8
macubergeek
Major Leaguer
 
Join Date: Jan 2002
Location: Gaithersburg, MD
Posts: 494
no luck

Merv sao
no luck, still same result, I'm thinking instead of putting source....in either
~/.cshrc or ~/.tcshrc I'll just invoke the source command at the command line when I need fink and otherwise ignore it.
macubergeek is offline   Reply With Quote
Old 02-07-2002, 06:36 AM   #9
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
My mistake

Sorry, made a mistake:

My previous post should be like this:

Remove "source /sw/bin/init.csh " from your .tcshrc file.

Then, write in the ~/.tcshrc file :

source ~/.cshrc

Write "source /sw/bin/init.csh " in your ~/.cshrc

This works for me.

Also:

macubergeek wrote:
<<I added this line to the end of my .tcshrc file: source /sw/bin/init.csh per the fink instructions>>

The fink instructions tell you to create the ~/.cshrc and write there:

source /sw/bin/init.csh

How did you installed fink?


Cheers...

Last edited by sao; 02-07-2002 at 06:38 AM.
sao is offline   Reply With Quote
Old 02-07-2002, 06:58 PM   #10
macubergeek
Major Leaguer
 
Join Date: Jan 2002
Location: Gaithersburg, MD
Posts: 494
thanks but

thanks sao but I tried all this. It didn't work.
I'm running the default tcsh shell. Not sure but believe it uses ~/.tcshrc or a system level .tcshrc and not .cshrc
As far as I can tell ~/.cshrc isn't getting sourced when I login but I'm not sure and any way I'm still getting the error. I installed fink from an apple package I downloaded from the fink web site.
macubergeek is offline   Reply With Quote
Old 02-07-2002, 07:57 PM   #11
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
from % man tcsh

Startup and shutdown
A login shell begins by executing commands from the system
files /etc/csh.cshrc and /etc/csh.login. It then executes
commands from files in the user's home directory: first
~/.tcshrc (+) or, if ~/.tcshrc is not found, ~/.cshrc,
then ~/.history (or the value of the histfile shell vari-
able), then ~/.login, and finally ~/.cshdirs (or the value
of the dirsfile shell variable) (+). The shell may read
/etc/csh.login before instead of after /etc/csh.cshrc, and
~/.login before instead of after ~/.tcshrc or ~/.cshrc and
~/.history, if so compiled; see the version shell vari-
able. (+)
mervTormel is offline   Reply With Quote
Old 02-07-2002, 10:09 PM   #12
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
macubergeek

In MacOSXHints, Rob Griffman has created a wonderful pdf "XFree86 Install Guide"
I suggest you read the instructions, and follow them, you can't go wrong with it.


http://homepage.mac.com/rgriff/xdarwin.html


Also, can you just try this:

Write "source /sw/bin/init.csh " in your ~/.cshrc

Then, erase everything in your ~/.tcshrc file except for your prompt settings.

Then add "source ~/.cshrc "

Try if this works. If it does, start to write all the other stuff, one by one. And check if it works.


Cheers...

Last edited by sao; 02-07-2002 at 11:52 PM.
sao is offline   Reply With Quote
Reply


Posting 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

Forum Jump



All times are GMT -5. The time now is 06:16 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.