Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5221

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>teaching M2 how to find its shared libraries</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_teaching_spyour_spshell_sphow_spto_spfind_sp__M2.html">next</a> | <a href="_finding_spthe_sp__Macaulay2_spfiles.html">previous</a> | <a href="_teaching_spyour_spshell_sphow_spto_spfind_sp__M2.html">forward</a> | <a href="_finding_spthe_sp__Macaulay2_spfiles.html">backward</a> | <a href="_getting_spstarted.html">up</a> | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<div><a href="index.html" title="">Macaulay2Doc</a> > <a href="_getting_spstarted.html" title="">getting started</a> > <a href="_teaching_sp__M2_sphow_spto_spfind_spits_spshared_splibraries.html" title="">teaching M2 how to find its shared libraries</a></div>
<hr/>
<div><h1>teaching M2 how to find its shared libraries</h1>
<div>Perhaps you know that your M2 executable is located at <tt>/foo/bar/bin/M2</tt>, say, but when you run it, you get something like this:<pre>    /foo/bar/bin/M2
    M2: error while loading shared libraries: liblapack.so: cannot open shared object file: No such file or directory</pre>
What that means is that M2 hasn't been told where its shared libraries are.  Actually, it's the operating system that has to be told, since otherwise M2 can't even start up.  Hopefully, the missing shared libraries are located in <tt>/foo/bar/lib</tt>, and all we have to do is to tell the operating system by setting the environment variable <tt>LD_LIBRARY_PATH</tt>, if you are running a Unix operating system.  If you have downloaded a version of Macaulay2 that comes with dynamically loaded libraries of its own, they will be in the directory <tt>/foo/bar/lib/Macaulay2/i686-Linux-Fedora-15/lib/lib/</tt>.  After setting <tt>LD_LIBRARY_PATH</tt> temporarily you may use <a href="_setup.html" title="">setup</a> to record the correct value in your system start up files.<p>Alternatively, you may be getting something like this:</p>
<pre>    $ /foo/bar/bin/M2
    dyld: Library not loaded: /capybara/lib/libgmp.3.dylib
      Referenced from: /foo/bar/bin/M2
      Reason: image not found
    Trace/BPT trap</pre>
That would mean that you are running under Mac OS, and the suggestion above would not apply.  On such systems, Macaulay2 must be installed in the system application folder, or Macaulay2 will not be able to find its libraries.</div>
</div>
</body>
</html>