You have to be admin (i.e. su to your admin account).  And THEN use
sudo to run the port command.  I believe only admin accounts can use
sudo to get root permissions, which is what you need.

On Wed, Nov 17, 2010 at 6:22 PM, Stephen Langer <[email protected]> wrote:
> Your root account doesn't have the right environment (path, etc), but your 
> user account doesn't have the right permissions.  Since you probably don't 
> actually have a root account, I don't know how to give it the right 
> environment...
>
> It might be easier if you use sudo instead of su.  Use visudo to give 
> yourself the same permissions as root when using sudo.  Then you can do root 
> tasks from your user account, but only via sudo, so it's not as risky as 
> actually logging in as admin.   sudo will use your environment, I think, but 
> root's permissions.
>
>  -- Steve
>
> On Nov 17, 2010, at 9:09 PM, Potato Soup wrote:
>
>> Ok, tried that but now it doesn't even see what 'port' command is, it's 'not 
>> found'. I am new to OSX, although not quite as new to Linux. I am just not 
>> getting how OSX is managing these things. It is acting quite weird.
>>
>> From: Stephen Langer <[email protected]>
>> To: Potato Soup <[email protected]>
>> Sent: Wed, November 17, 2010 9:00:18 PM
>> Subject: Re: Broken install on new SnowLeopard machine with 
>> MacPorts-1.9.2-10.6-SnowLeopard.dmg
>>
>> Try 'su -l'.
>>
>> -- Steve
>>
>> On Nov 17, 2010, at 8:48 PM, Potato Soup wrote:
>>
>> > I just logged in to my non Admin account and su'd to my admin account, and 
>> > when trying selfupdate, it failed with:
>> >
>> > Error: Synchronization of the local ports tree failed doing rsync
>> > Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the 
>> > ports tree: Synchronization of 1 source(s) failed
>> >
>> > It's almost as if su is not quite fully working. Weirdly when logged into 
>> > my admin account, I still had to su. Maybe that's how it works on OSX? But 
>> > this means that all commands to get things have to be done from an Admin 
>> > session, and su is not enough? That doesn't sound right to me.
>> >
>> > From: Scott Webster <[email protected]>
>> > To: Potato Soup <[email protected]>
>> > Cc: [email protected]
>> > Sent: Wed, November 17, 2010 8:35:44 PM
>> > Subject: Re: Broken install on new SnowLeopard machine with 
>> > MacPorts-1.9.2-10.6-SnowLeopard.dmg
>> >
>> > I "run" macports as a regular user... but when I want to run the port
>> > command I first "su" to an admin account and then run the port
>> > commands with sudo.  As far as I know macports requires full
>> > privileges to work properly.  Likely you could get something working
>> > fully as non-admin by installing from source and changing some
>> > options, but the installer assumes you want to put it in /opt/local
>> > etc.
>> >
>> > Scott
>> >
>> > On Wed, Nov 17, 2010 at 5:30 PM, Potato Soup <[email protected]> wrote:
>> > > Ok, I removed it, and then logged into OSX with an admin account and
>> > > reinstalled and then did selfupdate. Everything worked fine. So what's 
>> > > the
>> > > deal, how do I set it to work from a non Admin account? I never work in 
>> > > an
>> > > Admin account for fear of security issues.
>> > > ________________________________
>> > > From: Lenore Horner <[email protected]>
>> > > To: Potato Soup <[email protected]>
>> > > Cc: [email protected]
>> > > Sent: Wed, November 17, 2010 8:06:10 PM
>> > > Subject: Re: Broken install on new SnowLeopard machine with
>> > > MacPorts-1.9.2-10.6-SnowLeopard.dmg
>> > >
>> > >
>> > > On Nov 17, 2010, at 7:55 PM, Potato Soup wrote:
>> > >
>> > > Hi I just installed the latest SnowLeopard Mac Ports
>> > > (MacPorts-1.9.2-10.6-SnowLeopard.dmg) from the website, on my brand new 
>> > > 27"
>> > > iMac with SnowLeopard and latest xcode, and when running port, it fails
>> > > with:
>> > > dlopen(/opt/local/share/macports/Tcl/macports1.0/MacPorts.dylib, 10): no
>> > > suitable image found.  Did find:
>> > > /opt/local/share/macports/Tcl/macports1.0/MacPorts.dylib: no matching
>> > > architecture in universal wrapper
>> > >    while executing
>> > > "load /opt/local/share/macports/Tcl/macports1.0/MacPorts.dylib"
>> > >    ("package ifneeded macports 1.0" script)
>> > >    invoked from within
>> > > "package require macports"
>> > >    (file "/opt/local/bin/port" line 39)
>> > >
>> > > I searched and all I could find was examples of people having this issue
>> > > when upgrading from older OSX versions, not a brand new SLeopard. I am
>> > > stumped and I now have a broken install. Any help would be greatly
>> > > appreciated.
>> > >
>> > > Did you bring anything over from a previous Mac?  If you did this in any
>> > > automatic way, you probably brought over your old /opt/local built for 
>> > > the
>> > > wrong OS.  If not, I'm stumped but I'm sure someone else will know.
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > macports-users mailing list
>> > > [email protected]
>> > > http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>> > >
>> > >
>> >
>> > <ATT00001..c>
>>
>> --
>> -- [email protected]                    Tel: (301) 975-5423 --
>> -- http://math.nist.gov/mcsd/Staff/SLanger/  Fax: (301) 975-3553 --
>> -- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --
>>
>> -- "I don't think this will work.  That's why it's science."      --
>> --                    Naomi Langer (age 6),  17 Feb 2003        --
>>
>>
>>
>>
>>
>>
>> <ATT00001..c>
>
> --
> -- [email protected]                    Tel: (301) 975-5423 --
> -- http://math.nist.gov/mcsd/Staff/SLanger/   Fax: (301) 975-3553 --
> -- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --
>
> -- "I don't think this will work.  That's why it's science."      --
> --                     Naomi Langer (age 6),  17 Feb 2003         --
>
>
>
>
>
> _______________________________________________
> macports-users mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to