We can fix that! Following the guidelines given in this blog post and updates from this forum post, we can run pkg using OS's built-in 64-bit python. All modified files I've put in this github poject. Here are the steps:
- Hit the "pkg" tool:
/opt/glassfish/bin/pkg
(it should fail) mv /opt/glassfish/pkg/bin/pkg /opt/glassfish/pkg/bin/pkg.orig
- Download modified pkg script and copy to /opt/glassfish/pkg/bin/pkg
mkdir /opt/glassfish/pkg/custom-lib
cp -r /opt/glassfish/pkg/vendor-packages/pkg /opt/glassfish/pkg/custom-lib
- Install the dependencies so that we can compile the _actions.c:
apt-get install python-dev gcc python-cherrypy python-mako python-openssl python-ply python-pycurl python-simplejson
- Download _actions.c (you can clone the project if you have git installed on the server)
gcc -I/usr/include/python2.7 -shared -fpic -O2 _actions.c -o _actions.so
cp _actions.so /opt/glassfish/pkg/custom-lib/pkg/actions/_actions.so
- download __init__.py from the project folder
cp __init__.py /opt/glassfish/pkg/custom-lib/pkg/actions/__init__.py
- enjoy
No comments:
Post a Comment