I got a new mac and installed the same xampp web server as my old one.
Everything has been fine except when I call a java file :
$str_exec = "java -jar HelloWorld.jar";
exec($str_exec, $output,$result);
$output is now an empty array(), and $result = 5
I've tried absolute paths, permissions on everything, changing the user and group in https.conf (none of which I had to do before!)
I swear nothing has changed except I'm now using a macbook pro instead of an air. The files have always matched our main server files. The only thing appearing in the error log is:
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /Applications/XAMPP/xamppfiles/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Help please!! I've gone through all the similar threads to this issue on here and can't find anything on the internet anywhere! Gnh
EDIT:
Don't use the solution below. It will eventually break, as expected. Mine finally broke, throwing dyld errors when I tried to start the apache server. It wouldn't start at all. No idea why it worked before and doesn't now, but it doesn't matter. Just ditch XAMPP, and follow these instructions to spin up your own stack: http://jason.pureconcepts.net/2012/10/install-apache-php-mysql-mac-os-x/
Good luck!
ORIGINAL ANSWER:
Ok, I've got a working solution, although I know that it's not the safest by a long shot.
Here's what's up:
DYLD_LIBRARY_PATH is a var that modifies the way that the dynamic linking library looks for libs. Apparently many developers think that your software should not use this var. XAMPP does.
According to one solution, you can simply edit out the lines that include this file. (http://www.pdflib.com/fileadmin/pdflib/pdf/support/PDFlib-in-PHP-HowTo.pdf).
Open xamppfiles/bin/envvars with an editor and remove the lines that set and export DYLD_LIBRARY_PATH. Then restart apache.
However, this did not work for me. I also tried the same in a file called xamppfiles/bin/envvars-std. Still didn't work. It may be worth a try though.
The problem is that the XAMPP library conflicts with the mac osx library. So I just (effectively) deleted the XAMPP library. Of course that broke another library, but I continued on deleting the (hopefully redundant) XAMPP libs until it worked. Here's what I had to do:
XAMPP/xamppfiles/lib% sudo mv libjpeg.dylib _changed_libjpeg.dylib
XAMPP/xamppfiles/lib% sudo mv libtiff.dylib _changed_libtiff.dylib
XAMPP/xamppfiles/lib% sudo mv libpng.dylib _changed_libpng.dylib
XAMPP/xamppfiles/lib% sudo mv libiconv.2.dylib _changed_libiconv.2.dylib
XAMPP/xamppfiles/lib% sudo mv libexslt.0.dylib _changed_libexslt.0.dylib
XAMPP/xamppfiles/lib% sudo mv libxml2.2.dylib _changed_libxml2.2.dylib
XAMPP/xamppfiles/lib% sudo mv libxslt.1.dylib _changed_libxslt.1.dylib
After I moved each library to a name where it couldn't find it, I reran the script. It would error on another lib, and I would move it. After a few of these, it stopped. Everything still seems to be working fine in my XAMPP and Apache deployments.
And more importantly, I can now run exec("/usr/bin/php -v"); successfully!
HTH
Related
I installed Emscripten through the steps shown below:
1.) Download the emsdk-portable version for Linux/MacOSX
http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#sdk-downloads
2.)
Run
$ ./emsdk update
$ ./emsdk install latest
$ ./emsdk activate latest
$ source emsdk_env.sh (To update your environment variables)
I believe everything installed correctly, however I am unable to run emscripten anywhere outside of the emsdk folder.
I need to be able to run em++ in my: Documents/project3/dataviz/graphiti folder.
Also, when I run em++ -v in my emsdk folder, I get the following message I have been unable to resolve:
Java does not seem to exist, requierd for closure compiler,
which is optional (define JAVA in /home/bryce/.emscripten if you want it)
I attempted to define the java path in the folder, but I'm not sure how it should look.
Any help resolving these two issues would be very much appreciated.
The first problem sounds like the PATH isn't being set correctly. Type echo $PATH after running source emdsk_env.sh and check that the path to your emscripten installation has been added.
Note that you have to export the PATH for each terminal session you're using (it might be an idea to put source <path to emsdk dir>/emsdk_env.sh in your .bashrc file so this gets done automatically).
Could this link help with the second problem?
https://kripken.github.io/emscripten-site/docs/building_from_source/verify_emscripten_environment.html#installing-missing-components
I am trying to update RJava to reflect the latest version of Java 1.8 on my mac. I think I found the right information in doing so but the issue arises when I use 'Terminal' to run some code. I have to run:
sudo R CMD javareconf -n
but I receive an error of:
sudo: R: command not found
I found some information online and I found out I need to change the path in Terminal. I found out that the path where R is '/usr/bin/R'. When I changed the path using the command:
export PATH=/usr/bin/R:$PATH
and then tried to run the code again; I got no where and I am out of luck. I don't understand what the code is but I can only assuming what it does. Hopefully I can get some insight on how I can change the path so I can update rJava to the updated Java Version. Thank you for anyone's time.
The PATH setting would be PATH=/usr/bin:$PATH or you even easier
sudo /usr/bin/R CMD javareconf
Note that -n wouldn't do anything so you probably didn't mean that. Also if you don't even have /usr/bin on your PATH, you have probably even bigger issues since you also need to find java in the first place. In cases like that you may have better luck using sudo -i and then using the shell to fix whatever env vars are not setup correctly in your system.
I have problems after uninstalling jdk 7 on mac book pro with rm -rf /Library/Java/JavaVirtualMachines/jdkmajor.minor.macro[_update].jdk
I also have installed java 8 and Intellij works well. But any attempt to run java -version or mvn crashes with error:
dyld: could not load inserted library '/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/libjsig.dylib' because image not found
[1] 1216 trace trap mvn
And in the same time I can build all the projects with IntelliJ.
I even can't run vim - I have the same mistake.
So, my questions:
1. What is the correct way to uninstall JDK?
2. What should I do in my situation to restore the system?
As mentioned by mattias in his answer, your problem stems from a command in one of your bash startup files, that tells bash to load certain dynamic libraries before it attempts to run any command.
Using unset DYLD_INSERT_LIBRARIES will only solve this temporarily, for the current running terminal. So you should fix the problem permanently, by first running that command, and then editing your .bash_profile and .bashrc files with vim or nano.
If you see a line that says
export DYLD_INSERT_LIBRARIES=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/libjsig.dylib
just remove this line. If it inserts any additional libraries in addition to that libraries, just erase this particular library from /Library to libsig.dylib including the following : (if it's the last one, then the preceding :).
Exit Terminal, run it again and make sure your problem has been solved.
The procedure you have been following for removing the JDK is the correct one as suggested by Oracle. The problem was that once in the history of that machine, you or whoever was using it added that library to the DYLD_INSERT_LIBRARIES environment variable and this caused the problem. Also, the reason why this did not affect IntelliJ is that it is not running through bash, so bash commands do not affect it.
If you want to remove any other Java version, you should do the same as you did before, but make sure in advance that nothing in DYLD_INSERT_LIBRARIES refers to something inside /Library/Java/JavaVirtualMachines.
Have a look in your .bash_profile and try to look for
export DYLD_INSERT_LIBRARIES=/usr/lib/libSaturnFE.dylib
export DYLD_FORCE_FLAT_NAMESPACE=1
or anything similar. These might be causing the problem you experience.
Try commenting them out and reload your bash with
exec bash
and see if the problem persist.
I am using Ubuntu 14.04, but I think this question and its answers could be relevant to a beginner in Jena Fuseki using any operating system (if adapted slightly).
I am trying to install Jena Fuseki, however, the instructions in all the tutorials I have found and on the website are unclear to me. I downloaded this file jena-fuseki-1.1.0-distribution.tar.gz and unzipped it into my home directory.
I then ran the following commands:
cd jena-fuseki-1.1.0
mkdir dataDir
chmod +x fuseki-server s-*
fuseki-server --update --loc=dataDir /myDataSet
However this was the output in my terminal after the last command:
fuseki-server: command not found
I suspect there is something I haven't installed, but require to get this working. i.e.
Do I need Java on my machine?
Do I need Apache?
Do I need Apache Jena?
Or perhaps it is something entirely different that I am missing.
Keep in mind I am a beginner, so skipping over the obvious will not help me.
You need to have JAVA installed to successfully run Fuseki, but by the looks of your error you have it installed already, otherwise you would be getting an error message 'java: not found' (or similar).
Except for java there shouldn't be any other dependencies. I had a similar problem to you which I just solved and apparently it is a Linux problem and not a Fuseki error. This is what I did to get it working:
Download the 'apache-jena-2.12.0.tar.gz' and extract it to your (root)/opt folder (which seem to be the directory which is reserved for all the software and add-on packages that are not a part of the default installation).
The folder I extracted into /opt was called jena-fuseki-1.1.0, if you have a different name you have to change jena-fuseki-1.1.0 in the next two commands to the folder name you have. Run this command: export PATH=$PATH:/opt/jena-fuseki-1.1.0
Then run: export FUSEKI_HOME=/opt/jena-fuseki-1.1.0
If you want a persistent data store you should create a new folder in the 'jena-fuseki-1.1.0' folder in which to store the data. You do this by running mkdir dataDir from within the 'jena-fuseki-1.1.0' folder; (if you) call it 'dataDir' (you should) then run: fuseki-server --update --loc=dataDir /myDataset. You can change the name of 'dataDir' if you like and you can also pick a different name for /myDataset if you like which is the name you use when making calls to your database.
You don't need to download Jena seperately to use Fuseki.
That is all; you can now browse to 'localhost:3030' and start SPARQLing away :)
./fuseki-server --update --loc=dataDir /myDataSet
The current dir . is usually not in the path for security reasons. Try:
./fuseki-server --update --loc=dataDir /myDataSet
Also see Jena Fuseki Server command not found.
I am trying to get a grasp of unitTesting and have set out to follow this netTuts tutorial. In the tutorial it gets you to download a javafile from here. This file is then moved and then using
java -jar /usr/local/bin/selenium-server-standalone-2.38.0.jar
the file is meant to run.
My problem is that I get the message
Invalid or corrupt jarfile /usr/local/bin/selenium-server-standalone-2.38.0.jar
The searches I have made to resolve this issue talk about people creating their own file or something going wrong with the download as the file size should be bigger than what has been downloaded. Mine is 34.6MB which is what I believe to be about correct. I have also checked what Java version I am running (1.6.0_65), (here says 1.6+ is fine).
This appears to be a common problem, but I have not been able to find any solutions.
After trying a number of different options (including re-downloading on several occasions) it seems the file WAS corrupt.
I downloaded from here instead and it worked first time.
I faced this issue on Mac for selenium-server-standalone-4.0.0-alpha-1.zip.jar because of a bug https://github.com/angular/webdriver-manager/issues/370.
If someone is still facing the issue after trying all the solutions mentioned above, easiest way to get it working is to run the command with version(latest - stable).
sudo webdriver-manager --versions.standalone=3.9.1 update
then to start webdriver -
sudo webdriver-manager --versions.standalone=3.9.1 start
where 3.9.1 is version.
Apart from this also check for correct Java version
I was behind a corporate firewall when this corrupt file was created. I'm using OSX. For me, removing the file then re-downloading with proxy setting provided solved the problem.
1) sudo rm /usr/local/lib/node_modules/protractor/selenium/selenium-server-standalone-2.42.2.jar
2) sudo webdriver-manager update --proxy=http://<your proxy server>
Hope this helps!
On mac, I had to sudo on both.
sudo npm install -g protractor
sudo webdriver-manager update
Else it would give me the corrupt jar error, no need for proxy
I had the same error. It was corrupt and I just removed the .jar and did a webdriver-manager update again and got a new working .jar.
Well, this worked for me in windows.
In the command prompt, type the following commands in order.
webdriver-manager clean --out_dir
webdriver-manager update
Replace the file from here:
http://selenium-release.storage.googleapis.com/index.html
I downloaded the file from here and replaced it in my selenium folder.