How can I get rid of this in a MAC - osx-yosemite

I'm trying to compile apache http from source I have done this:
export CC=gcc
export CPP=cpp
but I'm getting this when I run make:
/usr/share/apr-1/build-1/libtool: line 8962: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/bin/cc: No such file or directory
What can I do? I don't know why it's calling cc instead of gcc as per the commands above and cc does exist anyway.
Thanks

I found that cc is actually at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ so I ran:
ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain
And that fixed it.

Related

SSH opening file error - no idea why

Running Debian Linux - newest version.
cp /included/filename /usr/bin/
It gives me error "cannot stat '/included/filename': No such file or directory
I don't get why there should be an error. I am doing it as superuser.
From your latest comment i conclude you got the paths mixed up. If you want to copy the file install.sh located under /usr/bin/included/ you would need to do
cp /usr/bin/included/install.sh /usr/bin/
to make something similar to your provided command work, id assume you are in /usr/bin and the first argument needs to be a relative one
cd /usr/bin
cp ./included/install.sh /usr/bin/
Please provide more information on what you are trying to do and provide realworld example code.

jscv : Cannot locate JVM library file

When I try to start a demo jsvc implementation I get the following error output of jsvc:
jsvc -cp ApacheDeamonDemo.jar -pidfile /mypath/pid.txt -outfile /mypath/log.txt -errfile /mypath/err.log net.example.deamon.DemoDeamon
I get the following error ouput:
Cannot find any VM in Java Home /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home
Cannot locate JVM library file
Service exit with a return value of 1
Actually the path is correct. Therefore I do not understand why jsvc is telling me this. I'm using a mac.
Almost five years later, so probably too late to help the original asker, but I had the same problem today trying to run jsvc with open-jdk-11 for AMD64, so this might help someone later.
To diagnose the problem, I ran jsvc with the --debug flag, and that told me that it was choking on trying to find libjvm.so. I ran find /usr/lib/jvm/java-11-openjdk-amd64 -name libjvm.so and found it at /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so, but jsvc was looking for it at /usr/lib/jvm/java-11-openjdk-amd64//lib/amd64/server/libjvm.so. So, I did this, and then jscv worked:
sudo mkdir /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64
sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/
It turns out the problem is fixed in later versions of jsvc. I experienced the issue with jsvc version 1.0.6, which is the one you get if you run apt install jsvc on Ubuntu 18.04. After I downloaded the 1.2.0 version commons-daemon src from Apache and compiled jsvc myself, the issue is fixed and I didn't need the symlink anymore.
Don't know why jsvc would try to locate all the dylib files and load them with dlopen, but apparently, this doesn't work well with Apple's Java release. While fixing jsvc might not be too hard, I just went firing up the JVM myself like so,
export JAVA_HOME=$(/usr/libexec/java_home)
export CATALINA_HOME=/Users/rong/Projects/apache-tomcat-8.0.12
export CATALINA_BASE=$CATALINA_HOME
java \
-server \
-classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
org.apache.catalina.startup.Bootstrap \
> $CATALINA_BASE/logs/catalina.out \
2> $CATALINA_BASE/logs/catalina.err
By wrapping this in a bash script and adding a bit of forking, changing UID stuff, you can forget about jsvc completely.

Installing manually PHPDocumentor on Mac

After trying to install PHPDocumentor with PEAR install with no success, i tried it manually as is detailed on the official website: http://www.phpdoc.org/docs/latest/for-users/installation.html
I downloaded the files and i make an alias on /usr/bin/ but when i try to execute phpdoc.php via terminal y it shows an error.
This is what i try:
> cd /usr/bin/
> ./phpdoc.php
And this is the error:
PHP Warning: include_once(/Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/../../vendor/autoload.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/Bootstrap.php on line 72
PHP Warning: include_once(): Failed opening '/Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/../../vendor/autoload.php' for inclusion (include_path='/Applications/MAMP/bin/php/php5.3.6/lib/php/:/Applications/MAMP/bin/php/php5.3.6/lib/bin/') in /Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/Bootstrap.php on line 72
PHP Fatal error: Class 'phpDocumentor_Task_Runner' not found in /Applications/MAMP/htdocs/phpdocumentor/bin/phpdoc.php on line 37
I am using Mac Os X and as you can see, i use MAMP to run Apache.
What's going on here? Why it tries to open a file which doesn't exist? (because it really doesn't exist inside PHPDocumentor folder)
Thanks.
Did you try :
curl -s http://getcomposer.org/installer | php
php composer install
on phpdocumentor2 directory (you should find composer.json)
Composer is a dependency manager for php. So it will populate phpdocumentor projet with external/vendor dependencies
Try this to install Composer into your MAMP php bin:
cd yourapp/ && curl -s http://getcomposer.org/installer | /Applications/MAMP/bin/php/php5.3.6/bin/php

Error on terminal start

-bash: /etc/profile.d/rvm.sh: No such file or directory
-bash: /Users/janekambani/.bash_profile: line 1: conditional binary operator expected
-bash: /Users/janekambani/.bash_profile: line 1: syntax error near `"$HOME/.rvm/scripts/rvm"'
-bash: /Users/janekambani/.bash_profile: line 1: `[[ -s "$HOME/.rvm/scripts/rvm"]] && . "$HOME/.rvm/scripts/rvm" '
I tried this:
sudo rm -rf /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm $HOME/.rvm $HOME/.rvmrc
but i still kept getting the same error.
im using OS X 10.8
Take a look at the source of /etc/profile.
On 10.8 of Mac OS, installing RVM while using sudo, adds a line to /etc/profile.d/rvm.sh. Even if you remove RVM using rvm implode, that one liner stays in there and will cause that error to show on start up of any terminal.
Use your favorite text editor (nano,vim, etc) to open /etc/profile and comment out these two lines:
source /etc/profile.d/sm.sh
source /etc/profile.d/rvm.sh
Then save the file.
To fix any issues with sourcing RVM use:
rvm get stable --auto-dotfiles #OR:
rvm get head --auto-dotfiles
It will remove existing sourcing lines and add new ones that are meant to work.
This is happening due to a botched installation of RVM (at least the part that tried to install the shell loader was botched). Did you recently try to install RVM?
Something kept trying to insert the RVM load code and it has made a mess.
Here is my suggestion:
Make a backup copy of your .bash_profile.
Open it in a text editor and remove everything but:
export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview:$PATH
export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview/command:$PATH
export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview/jsbuilder:$PATH
Add this line below that:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Save it and open another terminal and see if the error goes away.

Running script in FreeBSD

First steps in FreeBSD: trying to run my installation script. Fast help needed:
# ls
configure
# file configure
configure: Bourne-Again shell script text executable
# ./configure
./configure: Command not found
# configure
configure: Command not found
What is wrong, how can I execute this script?
Do you have bash installed? If not use FreeBSD Ports to install it. Use where bash to find out.
Use the force Luke :)
# pkg_add -r bash
May it be, that your's configure script doesn't have appropriate executions rights. Try to cast:
chmod 777 configure
If it works, fix it to
chmod 764 configure
configure scripts are ultra portable shell scripts. There is no need for bash here. The problem is somewhere else.
What's the first line in the configure script? Maybe a CR/LF snuck in, which is a common cause for a totally misleading error message saying that the script was not found, when it was the interpreter that was not found.
Please try /bin/sh ./configure
Install the bash package using
pkg add bash
or
make -C /usr/ports/shells/bash install clean
By default FreeBSD comes with tcsh and a POSIX compatible FreeBSD sh
On older FreeBSD systems you will need to do
rehash
before you can run it.
First line of this script (#!/usr/bin/bash, i suppose) should be changed to #!/usr/local/bin/bash.
And of course, you should have shells/bash port installed.