Hey Jean-Denis!  I think you may not have seen my most recent post : D

I used the link you sent me (i think it was yours) that explained that the
local .bash_login could be overriding my .profile.  I copied the contents of
.profile into my .bash_login and now my port command works just fine!

I also figured out that my $PATH was missing the / from $PATH=/usr/...

I had $PATH=usr/... which was causing my sqlite3 --version command to check
the global install of sqlite3 at usr/bin instead of the usr/loca/bin.  once
i added the slash it all worked great!

thanks for all your help!



Jean-Denis Muys-2 wrote:
> 
> 
> On 3/19/09 11:29 PM, "erfon haubenstock" <m...@erfon.com> wrote:
> 
>> 
>> Hi again.  Thanks for trying to help me by the way : D
>> 
>> I tried relauching terminal and even restarting my computer, but to no
>> avail.
>> 
>> I'm not totally sure I understand when you say:
>> 
>> One common pitfall here is that you must open a new shell for the port
>> command to be recognised (or re-export the correct PATH). This seems
>> likely
>> as the default location for the port command is /opt/local/bin/port,
>> which
>> is not in your PATH.
>> 
>> Do I need to change my PATH?
>> 
>> thanks!
>> 
>> erfon
>> 
> 
> OK. The short answer is STFW, namely
> http://lmgtfy.com/?q=macports+and+the+shell . Now let me expand on it for
> you.
> 
> In the terminal, the 'which' command followed by another command will tell
> you *which* file is executed when you run it. For example for me:
> 
>> JDMBook:~ $ which sqlite3
>> /usr/bin/sqlite3
>> JDMBook:~ $ which port
>> /opt/local/bin/port
> 
> As you can see, sqlite3 is in /usr/bin/, while port is elsewhere, namely
> /opt/local/bin. Let's check with ls:
> 
>> JDMBook:~ $ ls -la /usr/bin/sq*
>> -rwxr-xr-x  1 root  wheel  94144 Dec  9  2007 /usr/bin/sqlite3
>> JDMBook:~ $ ls -la /opt/local/bin/p*
>> -r-xr-xr-x  1 root  admin  106140 Dec 14 03:42 /opt/local/bin/port
>> lrwxr-xr-x  1 root  admin       4 Feb 13 17:22 /opt/local/bin/portf ->
>> port
>> -r-xr-xr-x  1 root  admin    4497 Dec 14 03:42 /opt/local/bin/portindex
>> -r-xr-xr-x  1 root  admin    2557 Dec 14 03:42 /opt/local/bin/portmirror
> 
> If I type any command in the terminal without its full path, the shell
> will
> look for the executable file in a number of places, which are determined
> by
> the PATH environment variable. Here is the value of PATH for me:
> 
>> JDMBook:~ $ echo $PATH
>> /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Volumes/Prune/Us
>> ers/klee:/usr/local/bin:/usr/X11/bin
> 
> Now, why is the shell able to run sqlite3 when I type 'sqlite3'? Because
> its
> directory /usr/bin/ is listed in my PATH. In the same way, the 'port'
> command works because its directory /opt/local/bin/ is listed in my PATH.
> 
> So my configuration looks good. What about yours? I'm not sure because you
> only gave us your PATH. I noticed that your PATH does not include
> /opt/local/bin/. So what could explain that? Here are a few possibilities:
> 
> - MacPorts is not installed at all. But you said you installed it.
> - MacPorts is not installed in its default directory. I don't know but you
> did not suggest anything like that.
> - MacPorts is not "fully" installed, where "fully" means "including
> altering
> the PATH".
> 
> Since you didn't tell us how you installed MacPorts, I can only guess and
> give a few suggestions:
> 
> 1) Do you have the port command in its default location?
> To check that, type the command 'ls -la /opt/local/bin/' as above.
> If the answer to that question is yes, then you can see the shell *cannot*
> execute it because its location is not in your PATH.
> 
> 2) Did you install MacPorts using the pkg in the disk image as
> http://www.macports.org/install.php suggests?
> If you did so, the installer should have updated your .profile shell
> startup
> script. As documented, that may not be good enough if you have a
> customized
> shell setup. In any case, here is my .profile:
> 
>> JDMBook:~ $ cat .profile
>> 
>> # MacPorts Installer addition on 2009-02-13_at_17:22:24: adding an
>> appropriate
>> PATH variable for use with MacPorts.
>> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
>> # Finished adapting your PATH environment variable for use with MacPorts.
>> 
>> 
>> # MacPorts Installer addition on 2009-02-13_at_17:22:24: adding an
>> appropriate
>> MANPATH variable for use with MacPorts.
>> export MANPATH=/opt/local/share/man:$MANPATH
>> # Finished adapting your MANPATH environment variable for use with
>> MacPorts.
> 
> If you installed MacPorts differently, then the MacPorts documentation
> tells
> you that you need to manually do something along those lines.
> 
> 3) Did you customize your terminal environment in any way?
> This could have been for example through .profile, .bashrc, .bash_login,
> .bash_profile etc...
> 
> If so, you might have to adjust your settings manually as described in
> TFM.
> 
> 4) Installation
> Assuming you have not changed anything in your terminal environment:
> Quit Terminal.app, then execute the MacPorts .pkg installer, then relaunch
> Terminal. Using the command shown above, verify that the port command
> exists
> in its default location, and that the default location is in your PATH.
> If not, alter your PATH as described.
> 
> 5) Don't be shy.
> In my previous answers I suggested you use the which command. Don't be
> shy.
> Do it. If you expect to be helped, it's better to show that you tried a
> few
> things... So if you *did* it, report the output.
> 
> Cheers,
> 
> Jean-Denis
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/sqlite3---version-showing-the-wrong-version-tp22596369p22617080.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to