Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Integration yields ImportError: libffi.so.4: No such file or directory

I can't use the symbolic integration feature of Sage 4.8. I tested some simpler features that work fine, but whenever I try the integrate() function, I get

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_8.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW50ZWdyYXRlKHgseCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmprPuvfe/___code___.py", line 2, in <module> exec compile(u'integrate(x,x) File "", line 1, in <module> File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/misc/functional.py", line 716, in integral return x.integral(*args, **kwds) File "expression.pyx", line 8402, in sage.symbolic.expression.Expression.integral (sage/symbolic/expression.cpp:32273) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/integration/integral.py", line 614, in integrate return indefinite_integral(expression, v) File "function.pyx", line 418, in sage.symbolic.function.Function.__call__ (sage/symbolic/function.cpp:4623) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/integration/integral.py", line 84, in _eval_ res = integrator(f, x) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/integration/external.py", line 19, in maxima_integrator result = maxima.sr_integral(expression,v) File "lazy_import.pyx", line 167, in sage.misc.lazy_import.LazyImport.__getattr__ (sage/misc/lazy_import.c:1395) File "lazy_import.pyx", line 110, in sage.misc.lazy_import.LazyImport._get_object (sage/misc/lazy_import.c:1047) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/interfaces/maxima_lib.py", line 72, in <module> from sage.libs.ecl import * ImportError: libffi.so.4: cannot open shared object file: No such file or directory

I assume the problem occurred because I broke something when I upgraded from 4.7 to 4.8. However, I don't know how to make Sage reinstall its copy of libffi, or make it re-link its libraries, or whatever.

If Sage doesn't have its own libffi and is instead looking for the copy installed on my system, then I know the problem: my system doesn't have "libffi.so.4," it has "libffi.so.5." However, I don't know how to make sage look for libffi.so.5 instead of libffi.so.4, and I don't know what the significance of the number suffix is.

Thank you for your assistance.

click to hide/show revision 2
retagged

Integration yields ImportError: libffi.so.4: No such file or directory

I can't use the symbolic integration feature of Sage 4.8. I tested some simpler features that work fine, but whenever I try the integrate() function, I get

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_8.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW50ZWdyYXRlKHgseCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmprPuvfe/___code___.py", line 2, in <module> exec compile(u'integrate(x,x) File "", line 1, in <module> File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/misc/functional.py", line 716, in integral return x.integral(*args, **kwds) File "expression.pyx", line 8402, in sage.symbolic.expression.Expression.integral (sage/symbolic/expression.cpp:32273) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/integration/integral.py", line 614, in integrate return indefinite_integral(expression, v) File "function.pyx", line 418, in sage.symbolic.function.Function.__call__ (sage/symbolic/function.cpp:4623) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/integration/integral.py", line 84, in _eval_ res = integrator(f, x) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/integration/external.py", line 19, in maxima_integrator result = maxima.sr_integral(expression,v) File "lazy_import.pyx", line 167, in sage.misc.lazy_import.LazyImport.__getattr__ (sage/misc/lazy_import.c:1395) File "lazy_import.pyx", line 110, in sage.misc.lazy_import.LazyImport._get_object (sage/misc/lazy_import.c:1047) File "/home/jacob/Sage/sage-4.7/local/lib/python2.6/site-packages/sage/interfaces/maxima_lib.py", line 72, in <module> from sage.libs.ecl import * ImportError: libffi.so.4: cannot open shared object file: No such file or directory

I assume the problem occurred because I broke something when I upgraded from 4.7 to 4.8. However, I don't know how to make Sage reinstall its copy of libffi, or make it re-link its libraries, or whatever.

If Sage doesn't have its own libffi and is instead looking for the copy installed on my system, then I know the problem: my system doesn't have "libffi.so.4," it has "libffi.so.5." However, I don't know how to make sage look for libffi.so.5 instead of libffi.so.4, and I don't know what the significance of the number suffix is.

Thank you for your assistance.