title: ImportError: liblapack.so.3gf: cannot open shared object file: Input/output error
body: <p>I am importing numpy into python on Ubuntu 12.04 using a PCDuino3. For some odd reason, several of my links in the <code>/etc/alternatives/</code> go bad after running my code. When I type <code>ls -l</code> in <code>/etc/alternatives</code>, I get <code>?? ??? ??</code> for all of the file attributes. I cannot remove the link even with super-user. I cannot reinstall numpy or liblapack successfully.</p>
  
  <p>My previous solution is to rebuilt the kernel from scratch and install python-numpy again but that blows. The symbolic link in <code>/etc/alternatives/</code> is targeted to <code>/usr/lib/liblapack/liblapack.so.3gf</code>. Then my python code runs for several iterations and finally I get the error:</p>
  
  <pre><code>ImportError: liblapack.so.3gf: cannot open shared object file: Input/output error 
  </code></pre>
  
  <p>Is there a work around to using the libraries in <code>/etc/alternatives</code> to use <code>/usr/lib/liblapack</code>? Can I use <code>LD_LIBRARY_PATH</code> when running Python? Is there an equivalent environment variable? </p>
  
  <p>The following is my complete error message.</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/ubuntu/Robotics2015/release/FeederContainerTracker2.0.py", line 12, in &lt;module&gt;
      import numpy
    File "/usr/lib/python2.7/dist-packages/numpy/__init__.py", line 137, in &lt;module&gt;
      import add_newdocs
    File "/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 9, in &lt;module&gt;
      from numpy.lib import add_newdoc
    File "/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 13, in &lt;module&gt;
      from polynomial import *
    File "/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 17, in &lt;module&gt;
      from numpy.linalg import eigvals, lstsq
    File "/usr/lib/python2.7/dist-packages/numpy/linalg/__init__.py", line 48, in &lt;module&gt;
      from linalg import *
    File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 23, in &lt;module&gt;
  from numpy.linalg import lapack_lite
  ImportError: liblapack.so.3gf: cannot open shared object file: Input/output error
  </code></pre>