Why can't my AMPL under Linux server find "gurobi"? - ampl

I installed AMPL and Gurobi under Linux server, but when I tried to run a file with AMPL, an error message Cannot find "gurobi" occurred:
.
How can I deal with this? Thanks.

Please see the part "Note for Mac and Linux users" in this link:
http://myweb.clemson.edu/~pbelott/teaching/past-teaching/mthsc810-f11/mthsc810-ampl/

Most likely the gurobi executable is not in the search paths specified by the PATH environment variable. There are multiple options:
Add a symlink to gurobi from the directory on search paths such as /usr/local/bin.
Modify $PATH to include directory containing gurobi.
Specify the path to gurobi in the solver option, e.g.
option solver `/path/to/gurobi`;

Related

YOCTO : No '/lib/modules' directory in image, modprobe fails

I'm trying to load and unload modules using modprobe but I'm having problems. The command fails with "modprobe:
can't change directory to '/lib/modules': no such file or directory"
There is actually no /lib/modules directory on the image at all.
PS : I used yocto project to build Linux os image and I'm using the 3.14 kernel.
Any help would be appreciated!
Probably you just don't have any modules installed. Add
IMAGE_INSTALL += "kernel-modules"
to your image recipe.
Update:
If this does not add the modules to the image, your next steps to check are:
Check if there actually any modules built. Not all kernel configurations actually do this. An easy way is to look into the tmp/deploy/... directory that holds your generated packages.
Check if the setting actually gets propagated to the iamge. bitbake -e on your image will tell, grep for IMAGE_INSTALL.
Update 2:
For 1) All built kernel-modules are automatically packaged in packages starting with "kernel-module-". So if there is no package bearing that prefix and the module name you expect, then its not a problem of installing, but a problem of your kernel or kernel config not building the module at all.
For 2) "I can't read it all": Thats why I explicitly said "grep for IMAGE_INSTALL" - you shall not read it all, just see if that variable actually includes "kernel-modules".
Well I found the solution:
In fact
IMAGE_INSTALL += "kernel-modules"
Does not add modules folder under /lib . It does not work wiTh YOCTO PROJECT SUMO release. I added this
CORE_IMAGE_EXTRA_INSTALL += " kernel-modules"
to my local.conf and now the /lib/modules is found and kernel-modules are packaged

Checksum did not match in 'npm i'

when i use npm i to install node_moudles,but something was wrong.
It said:
PhantomJS not found on PATH
Download already available at C:\Users\hdu42\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Checksum did not match
But in fact, in this directory on my computer, this file exists.
I don't understand why should I redownload it.
Anybody know? thanks!!!
Error is because of:
Phantomjs present in your \Local\Temp is not matching the checksum; defined in repository which is referring to PHANTOMJS_CDNURL-> environment variable.
Solution:
Download phantomjs from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip
Extract the zip
Add the path of bin C:\Users\YourUser\phantomjs-2.1.1-windows\phantomjs\bin; in your environment path

How to get the conda environment path inside a rule?

On previous versions of Snakemake (tested on 3.9.1 using integration with bioconda --use-conda) I could just check for the md5 hash of the environment.yaml file and find the respective environment at: workdir/.snakemake/conda/md5
On version 4.3.0 the md5 hash of the file does not match the environment folder. Looking at the source code I found out that the full path of the environment file is included when calculating the md5 hash to avoid conda errors on hard-coded paths but I am not sure how to generate the correct hash.
Is there another easier way to get the environment path inside a rule? If not, how can I generate the correct md5 to finde the environment?
Currently, the only reasonable way is to check the log. The path is displayed when the environment is activated. However, it is a very good idea to provide a command line option to list all environments, something like snakemake --list-conda-envs. I will do that as soon as possible.
EDIT: I have implemented --list-conda-envs in the master branch. It will be in the next release.

Why I get the error 'ln: failed to create symbolic link '?

I'm trying to install casperjs from git by the manual http://docs.casperjs.org/en/latest/installation.html#installing-from-git
but I get the error
ln: failed to create symbolic link ‘/usr/local/bin/casperjs’: No such file or directory
What can I do in this case? My operating system is Windows 8.
You don't need to create symbolic link on Windows. Just add CasperJS bin directory to the %PATH% environment variable
The command "ln -sf pwd/bin/casperjs /usr/local/bin/casperjs" is for linux system valid not for windows.
You have to set the enviroment variable in Windows and add casperjs/bin directory to the path. For further information, this article is the right place https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them
The filesystem where you're trying to create the link (not point to, but the link itself) must support these types of links.
For example, ext3, and btrfs support these links, but ntfs (like what you typically find on a USB stick) does not.
In other words you can have this trouble on Linux just as well as on windows.

Apache cross compile on arm

When I run "./configure --host=arm-linux --prefix=/sdcard/apr-util --with-apr=/sdcard/apache/apr --with-mysql=/sdcard/mysql".
It appears "the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file."
How can I solve this problem?Thanks.
You want to use --with-included-apr and put it in srclib/apr and srclib/apr-util beneath the httpd source package.