mod_python25 install error: Target org.macports.activate returned: Not a directory

Randall Perry listsub at systame.com
Mon Apr 13 08:35:36 PDT 2009


Bryan Blackburn wrote:
> On Mon, Mar 30, 2009 at 07:37:15PM -0500, Bill Hernandez said:
> [...]
>> --->  Activating mod_python25 @3.3.1_2
>>
>> Error: Target org.macports.activate returned: Image error: /opt/local/
>> apache2/modules/mod_python.so already exists and does not belong to a
>> registered port.  Unable to activate port mod_python25.
>> Error: Status 1 encountered during processing.
>
> That's the bad issue with the 'not a directory' problem, when the old one is
> uninstalled/deactivated, the files aren't actually removed (the error occurs
> before the file list is added to the file map, so port thinks it has no
> files).  This means you have to force the activation of the port, and of
> course deal with the annoying saved '*.mp_*' files.
>
Having problems getting mod_python working and saw this thread.

Error I'm getting:
--->  Activating mod_python25 @3.3.1_1
Error: Target org.macports.activate returned: Not a directory
Error: Status 1 encountered during processing.

I tried the suggestions offered:
>> Try:
>>  sudo port sync
>>  sudo port uninstall mod_python25
>>  sudo port install mod_python25

And did a force install, and got:

Error: Target org.macports.activate returned: Not a directory
Error: Status 1 encountered during processing.


The thing is, all the bits for it appear to be in place. I've loaded it
successfully in apache2:
    LoadModule python_module modules/mod_python.so

And configured it:

        AddHandler python-program .py
        PythonHandler mod_python.publisher
         PythonPath "['/opt/local/lib/libpython2.5.dylib',
'/opt/local/lib/python2.5']"
         PythonDebug On


But it's looking at the wrong path, despite using the PythonPath directive,
and also trying mod_env (see error below).

Does the macports activation error have anything to do with this, or is
there some other trick to get mod_python/Apache to find the correct path?





[Mon Apr 13 08:31:56 2009] [error] make_obcallback: could not import
mod_python.apache.\n
sys:1: RuntimeWarning: Python C API version mismatch for module _apache:
This Python has API version 1012, module _apache has version 1013.
ImportError: No module named mod_python.apache
[Mon Apr 13 08:31:56 2009] [error] make_obcallback: Python path being used
"['/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/si
te-packages/setuptools-0.6c3-py2.3.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
-packages/SQLAlchemy-0.4.8-py2.3.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat
-darwin', 
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat
-mac', 
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat
-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-
tk', 
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-
dynload', 
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site
-packages', 
'/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/python'
]".
 

-- 
Randall Perry






More information about the macports-users mailing list