I was only curious as to why my system is acting like this. So I have a CentOS system (centos 6.7-x86_64) with java and javac installed. Now, I'm trying to push this command through the terminal:
find /root/nlp/wasp/wasp-2.0alpha -name '*.java' | xargs javac -O
But it's giving me an error saying:
error: error reading /root/nlp/stanford/openIE/../models.jar
Now, my problem is that in my command, I've directed the system to find all java files under the /root/nlp/wasp.. directory, not anywhere near close to the /root/nlp/stanford directory.
Interesting enough, when I just run the command before the pipe, I get the correct results (i.e. - files in the path is specified).
find /root/nlp/wasp/wasp-2.0alpha -name '*.java'
So my questions are, why on earth is the system looking at: 1.) a .jar file when I asked for .java files and 2.) a file in the wrong directory specified?
I ended up just removing that .jar file in the other directory and everything seems to be OK. But for the life of me, I am curious!
Related
I recently installed parallels desktop on my Mac and am trying to cd some code files from the downloads folder but I get many errors.
I have tried many paths like:
C:\Users\name>\Mac\Home\Downloads\DNS
C:\Users\name>\Downloads\DNS
Nothing seems to be working I get the following errors:
'\Mac\Home\Downloads\DNS' is not recognized as an internal or external command,operable program or batch file.
The system cannot find the path specified.
Can someone help me?
So I installed Matlab from their site. I got the latest Linux .zip file, MCR_R2018a_glnxa64_installer.zip, unzipped it via unzip and ran install.
It worked, I got the different paths at the end as well. However, the command matlab wouldn't work. I tried to look for the file at the install location, at /usr/local/...
Then I tried to find the file by using the find command. I ran (sudo) find / -name "matlab" and (sudo) find / -type f -name "matlab". The first one gave me a whole list, so I check a few and they were just directories, so I switched it to the second command listed and got nothing. No output.
Did I do something wrong? Is there anything I can try?
Download binary packages on https://www.playframework.com/documentation/2.0/Installing gives me a play-2.0 folder with play exec file. However running play on that same directory using console returns
play: command not found
My environment is MAC and I tried
chmod a+x play
while running into the same problem
Can someone give me a guide on the installation process?
When we run a command, the shell look for this file (command) in a list of directories (folders). This list of directories is stored in a enviroment variable called PATH. If you want to see the values inside PATH. You can run:
echo $PATH
Note that the folders are separated by :.
The problem you are facing is because the shell can't find a dir that contains the file play. This happens because the play's dir is not in PATH
You can add play's dir to your PATH by running
export PATH=$PATH:/path/to/your/play/dir
This is a temporary thing. After you exit your shell session you will loose it. To make it permanent you need to edit the .bash_profile file in your home folder and add this command in the end of the file and save it.
I have installed a xampp portable package on my drive D, added the php folder path inside it on the system environment so I would be able to run php basically anywhere from the command line. but when i try to check if its working by executing the "php -v" command, it runs but i get this following error/warning messages.
"Warning: PHP Startup: Unable to load dynamic library 'xampp-portable\php\ext[:any].dll - The specified module could not be found."
*the [:any] there just means some dll filename.
and i get a lot of that warnings with just varying dll filenames,
anyway, here's the catch. when i do change my current path in the command line to somewhere in drive D, and then run the same command "php -v" it runs smoothly.
so what configuration should i do to fix this problem?
by the way, i do the same with mysql, putting its bin directory path on the system enviroment, run it in both inside drive C and drive D. and it runs smoothly. so i guess this problem is only on php.
I've posted the same question in xampp forums and this is the answer that was given to me. I'll be quoting the answer as it was and give credit to the one who answere it.
XAMPP is very proud that it don't have to set any environment
variables or registry values.
What you want to do is not possible with XAMPP portable without
mapping to a specific Drive letter. All configurations in xampp
portable have relative paths, so if you want to use cli from a
different drive letter, php can be executed, but all extensions of
them throw errors.
I would install the full version of XAMPP, map it to the current drive
letter with help of the setup_xampp.bat file and use the XAMPP control
panel Shell instead of default command line (advantage: The XAMPP
control panel shell sets local include paths to the needed XAMPP
folders).
Works for me (i can even use pear, git, composer, and other cli
scripts with the Xampp Shell if correct integrated).
best wishes, Altrea
credits to Altrea
Open your php.ini file, replace all relative paths to absolute paths. Eg: \xampp\ to C:\xampp\
I'm trying to install a font for use with TCPDF. To do so, I need to run the included command line utility ttf2ufm. (Included with TCPDF in fonts/utils/ttf2ufm) When I run it though, I get the error -bash: ttf2ufm: command not found. I'm probably just overlooking something simple, but I've searched and can't find what I'm missing here.
Should mention I'm using Debian Lenny.
Perhaps you do not know how commands are executed in bash.
If the program is not in the path, you need to specify the path to get it to run.
If you are in the right directory.
.../fonts/utils/ $ ./ttf2ufm ....
Note the ./ in front of it, that gives the file a path, in the present working directory, or the full path will work, or any other relative path. Just using ttf2ufm on its own will not, as the current directory is not usually part of the executable path.
Additionally, the program will need its executable bit set.