Strange error

Ryan Schmidt ryandesign at macports.org
Mon May 14 23:51:33 PDT 2007


On May 13, 2007, at 09:54, Randall Wood wrote:

> couldn't find HOME environment variable to expand path
>     while executing
> "file mkdir $macports_user_dir"
>     (procedure "dportinit" line 45)
>     invoked from within
> "dportinit ui_options global_options global_variations"
> Error: /opt/local/bin/port: Failed to initialize ports system,  
> couldn't find HOME environment variable to expand path

Sigh... Now I'm experiencing this error as well, when running port  
from a PHP script through my web server:

couldn't find HOME environment variable to expand path
     while executing
"file mkdir $macports_user_dir"
     (procedure "dportinit" line 45)
     invoked from within
"dportinit ui_options global_options global_variations"

If I preface the port command with something like HOME=/Library/ 
WebServer then I get this:

can't create directory "~/.macports": permission denied
     while executing
"file mkdir $macports_user_dir"
     (procedure "dportinit" line 45)
     invoked from within
"dportinit ui_options global_options global_variations"

If I manually create /Library/WebServer/.macports and set it owned by  
www, then MacPorts relents. But I'd rather not have to do that. I  
think I would prefer that if the HOME environment variable is not  
set, that MacPorts not complain about it, and learn to live without a  
~/.macports directory. There's nothing in it anyway, and my PHP  
script used to work just fine in previous versions of MacPorts.





More information about the macports-dev mailing list