How do I resolve no swt-cocoa-3557 or swt-cocoa in swt.library.path, java.library.path or the jar file error? - osx-snow-leopard

I can't get a swt application to work on Mac OSX Snow Leopard.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-cocoa-3557 or swt-cocoa in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.cocoa.NSThread.isMainThread(Unknown Source)
at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at com.astrobetty.geotag.Hello.main(Hello.java:12)
I have added -Dswt.library.path= and -Djava.library.path statements to the "VM arrguments" hand have also tried setting them as variables in the "environment" section of the Eclipse run configuration page.
I've verified that my .jar file is at the path I specify. If I look inside the .jar, it seems to contain these libraries:
102 Feb 12 13:21 META-INF
183 Feb 12 13:21 external.xpt
37104 Nov 17 2009 libswt-awt-cocoa-3557.jnilib
287228 Nov 17 2009 libswt-cocoa-3557.jnilib
548252 Nov 17 2009 libswt-pi-cocoa-3557.jnilib
313420 Nov 17 2009 libswt-xulrunner-cocoa-3557.jnilib
136 May 23 22:19 org
13 Feb 12 13:21 version.txt
Any ideas on how to get this to work? Is it possible at all?
I added swt as a "dependent project" as detailed here
http://www.eclipse.org/swt/eclipse.php
and it does seem to find the .jar files at edit time (I get syntax checking, etc, for the swt classes and methods.)

I had the same issue in android, in my case, I've solved like this:
Download "swt-3.7.1-cocoa-macosx-x86_64.zip" from
http://archive.eclipse.org/eclipse/downloads/drops/R-3.7.1-201109091335/
and put the "swt.jar" into the "android-sdk-macosx/tools/lib/x86_64" directory.
You can safely overwrite the existing swt.jar.

Adding a 'dependent project' works in the IDE, but not for deployment. You're probably in the OSGi environment... I'm not sure how you're deploying the product, but if you create a .product file (New-->Product Configuration), include your plugins and the SWT plugins and then export using that product and I'm sure it'll work out for you.

Related

Google App Engine Tutorial Hello World Example won't run

I am having difficulty getting to the starting line on my machine.
1) Windows 7 32bit all service packs installed
2) Installed JDK 1.7.0_21
3) Checked PATH that only one copy of JDK\bin is in path and that it is correct.
4) Installed Eclipse Juno Java bundle. eclipse-java-juno-SR2-win32.zip
5) Install Google App Engine SDK per the tutorial using:
https://dl.google.com/eclipse/plugin/4.2
Selected:
- Google Plugin for Eclipse
- GWT
- SDK
Did NOT select:
- Developer Tools (Android)
- Google App for Android
- NDK Plugins
6) Following the tutorial, pull down the Google Icon and select "New Web Application Project"
- Name it Guestbook as shown
- Uncheck GWT
- Check Google App Engine
- Finish
7) Following the tutorial, Run as Web Application
At this point, the console shows several successful steps and then crashes and burns with jetty unable to establish a loop back connection. The full console output is attached below. I have searched all over the web and have not been able to find anything. I checked PATH and JDK. I checked the Windows firewall rule for Eclipse, it looks OK. I looked at the Classpath tab but could not see anything obviously wrong (although I don't know what it is supposed to look like)
Full Console Output
Jun 15, 2013 2:56:51 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed E:\User Data\Dave\Documents\Google App Engine Scratch\Guestbook\war\WEB-INF/appengine-web.xml
Jun 15, 2013 2:56:51 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed E:\User Data\Dave\Documents\Google App Engine Scratch\Guestbook\war\WEB-INF/web.xml
Jun 15, 2013 2:56:51 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'E:\Eclipse Google App Engine\eclipse\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.8.1\appengine-java-sdk-1.8.1\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'E:\User Data\Dave\Documents\Google App Engine Scratch\Guestbook\war\WEB-INF\appengine-web.xml'
Jun 15, 2013 2:56:51 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 15, 2013 7:56:52 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Jun 15, 2013 7:56:54 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed org.mortbay.jetty.nio.SelectChannelConnector$1#15321fc: java.io.IOException: Unable to establish loopback connection
Jun 15, 2013 7:56:54 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed SelectChannelConnector#127.0.0.1:8888: java.io.IOException: Unable to establish loopback connection
Jun 15, 2013 7:56:54 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed Server#150305e: java.io.IOException: Unable to establish loopback connection
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source)
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(Unknown Source)
at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source)
at java.nio.channels.Pipe.open(Unknown Source)
at sun.nio.ch.WindowsSelectorImpl.<init>(Unknown Source)
at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source)
at java.nio.channels.Selector.open(Unknown Source)
at org.mortbay.io.nio.SelectorManager$SelectSet.<init>(SelectorManager.java:312)
at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:223)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:314)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:249)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:307)
at com.google.appengine.tools.development.AutomaticServerInstanceHolder.startUp(AutomaticServerInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractServer.startup(AbstractServer.java:80)
at com.google.appengine.tools.development.Servers.startup(Servers.java:82)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:237)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:339)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:274)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:250)
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Unknown Source)
at sun.nio.ch.Net.connect(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at java.nio.channels.SocketChannel.open(Unknown Source)
... 26 more
PROBLEM SOLVED!
I was able to absolutely nail the cause of this problem and fix it.
What I did was removed the JRE and JDK from "C:\Program Files\Java\" (which is where Oracle's installer puts them by default) and reinstalled them in "C:\Java\Java7\" Apparently something in Eclipse and/or the Google Android development kit is still sensitive to spaces in the pathname to the JDK. This is an ancient general problem with Eclipse reported around 2005.
I did NOT need to drop down to Java 6
I did NOT need to edit Eclipse.ini and add a -VM line
I did NOT need to manually add the path to the jdk to PATH
Hope this helps the next person because this is an incredibly frustrating problem when you encounter it.
Thanks!
David Hetherington
Problem: Trying to run the 'Hello World' app using google eclipse plugin (eclipse - Kepler).
Solution: Adding to David's answer. If you have multiple jre's installed make sure the jre you are pointing to does not have a space in the absolute path. To change the jre you are pointing to go to eclipse - window->preferences->server->runtime environments->google app engine->edit. Now check the jre version you are pointing to. In my case I had jdk 1.7 installed in Program Files/Java and jre6 and jre7 installed in the same location. I moved jdk 1.7 to Program_files but was still getting the loopback error. Followed the above steps and pointed the jre version to the one in jdk1.7/jre in Program_files/java as earlier it was pointing to C:/Program Files/java/jre7
Hope this helps someone.
Are you sure you don't have anything else running with the same PORT number as the web-application? Default webapplication PORT is 8888

Google app engine sdk is using JRE Not JDK

I am not using eclipse, using GAE SDK to upload my project, problem is when i am trying to upload it is using jre not jdk thats the reason i am getting below error, please help how can i force app engine sdk to use JDK instead of jre
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\j1013366\Desktop\social.login.2013\appengine-java-sdk-1.8.0\appengine-j
ava-sdk-1.8.0\bin>appcfg.cmd update apps/SocialLoginProject
Reading application configuration data...
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.AppEngineWebXmlReade
r readAppEngineWebXml
INFO: Successfully processed apps/SocialLoginProject\WEB-INF/appengine-web.xml
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.AbstractConfigXmlRea
der readConfigXml
INFO: Successfully processed apps/SocialLoginProject\WEB-INF/web.xml
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.IndexesXmlReader rea
dConfigXml
INFO: Successfully processed apps\SocialLoginProject\WEB-INF\appengine-generated
\datastore-indexes-auto.xml
Beginning interaction for server default...
0% Created staging directory at: 'C:\Users\j1013366\AppData\Local\Temp\appcfg152
7926604447976257.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
Error Details:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:238)
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:214)
at org.apache.jasper.JspC.processFile(JspC.java:1181)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:
40)
Caused by: java.lang.NullPointerException
at com.google.appengine.tools.development.LocalJspC$LocalCompiler.<clini
t>(LocalJspC.java:53)
... 7 more
com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp
files.
Unable to update app: Failed to compile jsp files.
Please see the logs [C:\Users\j1013366\AppData\Local\Temp\appcfg5225288314554557
20.log] for further information.
C:\Users\j1013366\Desktop\social.login.2013\appengine-java-sdk-1.8.0\appengine-j
ava-sdk-1.8.0\bin>
Personally I have intentionally set it up to use the JRE from within the SDK by modifying appcfg.cmd to
"%JAVA_HOME%\bin\java" -Djava.home="%JAVA_HOME%\jre" -Xmx1100m -cp "%~dp0\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg %*
and setting JAVA_HOME to point to the JDK.
I am guessing you could modify -Djava.home="%JAVA_HOME%\jre" to point to wherever you like.

Eclipse, XAMPP, xDebug - waiting for XDebug session - stays in 57%

When I start debugging the process stays there at 57% and says "waiting for XDebug session".
This is a duplicate post on StackOverFlow, but I tried all the answers, nothing worked.
It was working fine until before two days. I don't know what went wrong.
Having used Eclipse to launch xdebug sessions in Firefox for ever now, all of a sudden 23/4/2013 it would not launch xdebug using Firefox. It gave me the launch 57% and hang problem.
It was quite happy to launch xdebug sessions in IE/Chrome/Safari/Opera but not Firefox.
The only thing I changed around this time was I upgrades my java runtime to 1.7.0_21 from a previous version ( cannot remember which but I did jump more than one release so it was probably 1.7.0_19 )
I took a look at the project log file, Check your projects workspace folder for a subfolder called .metadata where there should be a .log file, there is one of these for each project so be sure you are looking at the correct one.
This is what was in mine:
!SESSION 2013-04-23 11:06:21.238
----------------------------------------------- eclipse.buildId=M20130204-1200 java.version=1.7.0_21
java.vendor=Oracle Corporation BootLoader constants: OS=win32,
ARCH=x86, WS=win32, NL=en_GB Command-line arguments: -os win32 -ws
win32 -arch x86
!ENTRY org.eclipse.ui.browser 4 0 2013-04-23 11:07:32.584 !MESSAGE
Launching C:\Program Files\Mozilla Firefox\firefox.exe has failed.
!STACK 0 java.io.IOException: Cannot run program "C:\Program":
CreateProcess error=2, The system cannot find the file specified at
java.lang.ProcessBuilder.start(Unknown Source) at
java.lang.Runtime.exec(Unknown Source) at
java.lang.Runtime.exec(Unknown Source) at
java.lang.Runtime.exec(Unknown Source) at
org.eclipse.ui.internal.browser.browsers.MozillaBrowser$BrowserThread.openBrowser(MozillaBrowser.java:94)
at
org.eclipse.ui.internal.browser.browsers.MozillaBrowser$BrowserThread.run(MozillaBrowser.java:165)
Caused by: java.io.IOException: CreateProcess error=2, The system
cannot find the file specified at java.lang.ProcessImpl.create(Native
Method) at java.lang.ProcessImpl.(Unknown Source) at
java.lang.ProcessImpl.start(Unknown Source) ... 6 more
Because I saw this line
java.io.IOException: Cannot run program "C:\Program": CreateProcess error=2,
It made me thinks that for some reason java could no longer cope with folder names with spaces in them (very strange), so I changed the eclipse preferences and used the 8.3 naming convension C:\PROGRA~1\MOZILL~1\firefox.exe
Now it launches the xdebug session again!!
This is very strange as it does not seem to have problems with
C:\Program Files\Opera\opera.exe OR
C:\Program Files\Safari\Safari.exe OR
C:\Program Files\Internet Explorer\iexplore.exe
So all I can think of is that it does not like 2 folder names with spaces in them for some obsqure reason, because it wont launch firefox from C:\Program Files\Mozilla Firefox\firefox.exe
I assume it launches IE from a similiar folder named address as it is the default browser on this system.
Anyhow, the solution for me was to change the eclipse preferences ->General -> Web Browser -> Firefox
to use the 8.3 DOS directory naming convension.
Hope this helps
riggsfolly's analysis and solution are both correct, however for some reason my eclipse would not allow me to use the DOS 8.3 naming convention. As an alternative for those who run into the same issue you can try the following:
Create a parallel folder structure but do it without spaces (eg. "C:\ProgramFiles86\MozillaFirefox\")
Download and install firefox, using the custom installation options to install to your new 'spaceless' directory
In eclipse preferences ->General -> Web Browser: Make a new entry (eg. "Firefox2") and point it at your new installation (eg. C:\ProgramFiles86\MozillaFirefox\firefox.exe").
Finishing touch - use Mozilla Sync between the two browsers so you don't have to worry about outfitting your new Firefox.
And the easiest way I used to find out the 8.3 compatible windows path of Mozilla Firefox is as below.
C:\>dir .* /x
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of C:\
File Not Found
C:\>dir *.* /x
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of C:\
07/14/2009 08:50 AM <DIR> PerfLogs
04/01/2013 07:32 PM <DIR> PROGRA~1 Program Files
05/14/2013 01:50 PM <DIR> PROGRA~2 Program Files (x86)
01/17/2013 01:43 PM <DIR> Users
05/12/2013 05:46 AM <DIR> Windows
C:\>cd PROGRA~2
C:\PROGRA~2>dir *.* /x
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of C:\PROGRA~2
05/14/2013 01:50 PM <DIR> .
05/14/2013 01:50 PM <DIR> ..
05/14/2013 01:50 PM <DIR> COMMON~1 Common Files
03/05/2013 10:50 AM <DIR> Google
07/14/2009 11:07 AM <DIR> INTERN~1 Internet Explorer
04/19/2013 06:03 PM <DIR> Java
04/14/2013 10:16 PM <DIR> MOZILL~1 Mozilla Firefox
04/15/2013 10:57 AM <DIR> MOZILL~2 Mozilla Maintenance Service
C:\PROGRA~2>cd MOZILL~1
C:\PROGRA~2\MOZILL~1>
I had a similar problem. mine stayed at 72%. I solved my issue by setting
xdebug.mode = debug
in the php.ini file.
I restarted the apache server now it works fine.
In addition to RiggsFolly's life-saving solution, maybe the following is useful for anyone.
Issue 1: different path on 32 bits and 64 bits Windows 7
On 32 bits Windows 7, the path is:
C:\PROGRA~1\MOZILL~1\firefox.exe
On 64 bits Windows 7, the path is:
C:\PROGRA~2\MOZILL~1\firefox.exe
(Note the different figure behind PROGRA~ , as I figured out by Abu Sithik's post)
Issue 2: Where to set the path?
You should do the setting (as RiggsFolly had already correctly said) in:
Window > Preferences > General > Web Browser > Firefox > Edit
and NOT (as I did intuitively) in Run > Debug Configurations > Web browser > Firefox - Internal Server.
At least, as far as I tried out (but I'm a relative Eclipse novice) it seems this setting doesn't influence the path that Eclipse/xdebug/java uses to start the browser in an xdebug session.
I hope this helps anyone prevent wasting time as I did fiddling around in vain, when switching between computers running resp. 32 bits and 64 bits Windows, and having to change the path to the firefox executable, until at a certain moment by luck I got the correct ways as indicated above...
I have the same problem, but suddently works when I select de 'Default system web browser instead of Firefox directly. My default web browser is Firefox and now it starts oks.
I hope this helps.

Tomcat runs but complains about missing server.xml

I'm using ubuntu 9.10 and I installed java and tomcat using the package manager. When I went to run startup.sh, it first complains about catalina.out not being there and not being writable. I fixed that and it doesn't complain about that (why isn't that included in the install??) Now it's complaining about server.xml not being there when I shut down the server. Here is my output from command line:
user#desktop:/usr/share/tomcat6$ ./bin/startup.sh
Using CATALINA_BASE: /usr/share/tomcat6
Using CATALINA_HOME: /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME: /usr/lib/jvm/java-6-sun-1.6.0.15
user#desktop:/usr/share/tomcat6$ ./bin/shutdown.sh
Using CATALINA_BASE: /usr/share/tomcat6
Using CATALINA_HOME: /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME: /usr/lib/jvm/java-6-sun-1.6.0.15
Dec 11, 2009 4:42:57 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:407)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
user#desktop:/usr/share/tomcat6$
I'm really new to tomcat so this might be a dumb question, but why isn't there a sample server.xml in a fresh install of tomcat? What can I put in there to shut it up... even if its just a stub and a +1 to any one who can explain to me the structure of this file?
Try using server.xml located at:
/etc/tomcat6/server.xml
server.xml is the configuration file for the application server. It contains stuff like what port is the server going to listen at, where are the applications being deployed, and other related stuff.
More info on Tomcat in Ubuntu:
https://help.ubuntu.com/12.04/serverguide/tomcat.html

Are PackageMaker installations with preinstall scripts broken on Snow Leopard?

Everything worked on 10.5, but now my PackageMaker installation project is broken. I've been fighting a problem for a few days now, and either
Snow Leopard (OS X 10.6.1) has broken PackageMaker installations
I am lacking a very, very basic tidbit of knowledge
To narrow down the problem, I've gotten to this point:
Create a new PackageMaker installation
Have it install a jpeg image into my home directoy
Define a preinstall script that does nothing
#!/bin.sh
exit 0
Run the above...and watch it fail with the below error message like clock work
Sep 14 15:09:45 manoa installd[5620]: PackageKit: ----- Begin install -----
Sep 14 15:09:45 manoa installd[5620]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
Sep 14 15:09:45 manoa installd[5620]: PackageKit: packages=(\n "PKLeopardPackage <file://localhost/Users/stu/Desktop/asdf.pkg>"\n)
Sep 14 15:09:46 manoa installd[5620]: PackageKit: Extracting /Users/stu/Desktop/asdf.pkg (destination=/var/folders/Hb/HbXJFyEpFaupt5QyLN-pTk+++TI/-Tmp-/PKInstallSandbox-tmp/Root/~, uid=501)
Sep 14 15:09:46 manoa installd[5620]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB
Sep 14 15:09:46 manoa installd[5620]: PackageKit: *** launch path not accessible
Sep 14 15:09:46 manoa installd[5620]: PackageKit: Install Failed: PKG: pre-install scripts for "test.test.5year_header.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x100149430 "An error occurred while running scripts from the package “asdf”." {\n NSFilePath = "./preinstall";\n NSLocalizedDescription = "An error occurred while running scripts from the package \U201casdf\U201d.";\n NSURL = "file://localhost/Users/stu/Desktop/asdf.pkg";\n PKInstallPackageIdentifier = "test.test.5year_header.pkg";\n}
Sep 14 15:09:46 manoa Installer[5614]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1195917c0 "An error occurred while running scripts from the package “asdf”."
Sep 14 15:09:46 manoa Installer[5614]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Sep 14 15:09:47 manoa Installer[5614]: IFDInstallController 144040 state = 7
Sep 14 15:09:47 manoa Installer[5614]: Displaying 'Install Failed' UI.
Sep 14 15:09:47 manoa Installer[5614]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
There is no file in /private/tmp/PKInstallSandbox.cmlS2H/Scripts/test.test.5year_header.pkg.PFrHNB/, which makes me think the problem is with PackageMaker, and not me. But I'm new to the world of OS X software installation, so doubts remain.
So, the question: Is PackageMaker with a preinstall script broken on OS X 10.6? Or is there some requirement regarding preinstall scripts that I do not understand?
I had the same problem and setting the executable permissions for the scripts solved it for me!
pkgutil --expand my.pkg my
chmod +x my/inner.pkg/Scripts/preinstall
pkgutil --flatten my my-fixed.pkg
Found this solution in this thread at golang-nuts groups
"launch path not accessible" may very well have to do with which software is zipping and/or unzipping the PKG.
So, I was having the problem that my postflight script was not running and was causing my PKG to fail. Looking at the installer log (to see this run the PKG in question, then menu item 'Window > Installer Log' and select 'Show All Logs' from drop down) I saw the dreaded 'launch path not accessible' when it was trying to run script (renamed by PackageMaker to 'postflight').
The problem was only showing up on my customer's systems. It was a real stumper as both of my Mac test machines had no problem running the PKG and their environments appeared to be the same as the customer's machines.
Then in an obscure post on a Symantec website I saw that someone discovered that this problem has something to do with how the PKG is being zipped and/or unzipped.
Sure enough. My customer was downloading the PKG from DropBox and the way that DropBox was zipping it corrupted something inside the PKG.
The solution was for me to ZIP the PKG on my system before uploading to DropBox and then everything worked swimmingly.
I had the same problem. Check the first line of your script. In my case the ! was missing
from the #!/bin/sh

Resources