Problem with MacPorts on OS X Leopard

Ryan Schmidt ryandesign at macports.org
Tue Aug 5 21:39:32 PDT 2008


On Aug 5, 2008, at 20:27, Mark Hattam wrote:

> Ryan Schmidt wrote:
>
>> On Aug 4, 2008, at 20:19, Mark Hattam wrote:
>>
>>> Running the PostFlight command line doesn't work ...
>>>
>>> Powerbook:~ markhattam$ $ curl -O http://svn.macports.org/ 
>>> repository/macports/branches/release_1_6/base/portmgr/dmg/ 
>>> postflight && bash postflight
>>> -bash: $: command not found
>>>
>>> I just tried it to see what it puts into .profile ... even if  
>>> it'll never use it. But still.
>>
>> You're not meant to type the dollar sign at the terminal. The  
>> dollar sign is meant to represent your terminal's prompt. Type (or  
>> copy/paste) everything after the dollar sign.
>
> Hmm ... I'd copied/pasted the contents of the text field from the  
> webpage by triple clicking to select the field. I'd suggest that  
> including the prompt in that field is misleading, and it's  
> inherently awkward to them step backwards and backspace delete it  
> in Terminal. Just put in the field, the exact text you expect the  
> user to use.

Looks like in the Guide, we preface all commands which are to be  
typed in the terminal with "%%". Not sure why that was chosen. I've  
never seen a terminal issue "%%" as a prompt. But at least we explain  
it at the top of the Guide.

In the FAQ wiki page, no prefix is used. In the ProblemHotlist wiki  
page, no prefix is used except where you encountered it, so I removed  
it there. I believe anyone can edit the wiki once they register, so  
in the future you can feel free to fix problems there yourself.


> Anyway, tried it and got lots of errors. Tried it again with "sudo"  
> on the front, still got lots of errors ...

Everything worked as it was supposed to:


> Powerbook:~ markhattam$ curl -O http://svn.macports.org/repository/ 
> macports/branches/release_1_6/base/portmgr/dmg/postflight && bash  
> postflight
>   % Total    % Received % Xferd  Average Speed   Time    Time      
> Time  Current
>                                  Dload  Upload   Total   Spent     
> Left  Speed
> 100  7254  100  7254    0     0   6729      0  0:00:01  0:00:01  
> --:--:-- 16200
> The MacPorts Project, postflight script version 1.6.1: checking the  
> shell environment for user "markhattam".
> Detected the bash shell.
> Your shell already has the right PATH environment variable for use  
> with MacPorts!

It did not add statements to your .profile to modify your PATH  
because it detected your PATH already contained what it needed to,  
thanks to your manual modifications of .bash_profile.


> Your shell already has the right MANPATH environment variable for  
> use with MacPorts!

I was momentarily confused because the subject of this thread  
contains "Leopard" but then I recalled you were not the originator of  
the thread and you are running Tiger on a 667-MHz PowerBook G4. Tiger  
and earlier ship with an empty MANPATH variable, which causes the  
bash shell to make use of the paths in PATH to decide where to find  
manpages. So it is not necessary to set MANPATH to anything to make  
MacPorts manpages usable. Therefore the postflight script did nothing  
here.


> An appropriate DISPLAY variable has been added to your shell  
> environment by the MacPorts installer.

Apple sets the DISPLAY variable to the right value as of Leopard, but  
for Tiger and earlier it is unset which means you cannot use X11  
programs from the normal terminal unless you set DISPLAY yourself.  
Therefore the postflight added the DISPLAY variable to your .profile.


> Synchronizing the MacPorts installation with the project's rsync  
> server...
> Synchronizing local ports tree from rsync://rsync.macports.org/ 
> release/ports/
> receiving file list ... done
> rsync: failed to set times on "/opt/local/var/macports/sources/ 
> rsync.macports.org/release/ports/.": Permission denied (13)

[snip]

> An attempt to synchronize your recent MacPorts installation with  
> the project's rsync server failed!
> Please run 'sudo port -d selfupdate' manually to find out the cause  
> of the error.

It is expected that the postflight script cannot sync or selfupdate  
because it is not running as root. A few days ago the wiki page was  
changed to suggest using sudo. However this was found to cause other  
problems (the USER variable which the script requires to be set to  
your username gets set to "root" instead), so the change was  
reverted. I will update the wiki page to indicate that these errors  
are expected.


> You have succesfully installed the MacPorts system, launch a  
> terminal and try it out!
> Read the port(1) manual page and http://guide.macports.org for  
> help, http://www.macports.org/contact.php if you need to get in  
> touch with The MacPorts Project.
>
>
> Doing a
> sudo port -d selfupdate
> as this suggested worked fine ... no problems.
>
>
> The new .profile just has this
>
> # MacPorts Installer addition on 2008-08-06_at_02:13:40: adding an  
> appropriate DISPLAY variable for use with MacPorts.
> export DISPLAY=:0
> # Finished adapting your DISPLAY environment variable for use with  
> MacPorts.


By the way, please remember to Reply All so your reply goes to the  
list too, not just to me.



More information about the macports-users mailing list