Re: sage only runs as root

59 views
Skip to first unread message

Volker Braun

unread,
Jul 9, 2012, 4:27:28 PM7/9/12
to sage-s...@googlegroups.com
I would guess that the permissions of the dylib files or the containing directory are wrong.

On Monday, July 9, 2012 8:47:04 PM UTC+1, Yuri Delanghe wrote:
When I try to run sage, I get

ImportError: dlopen(/Applications/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so, 2): Symbol not found: _iconv
  Referenced from: /Applications/sage/local/lib/libgd.2.dylib
  Expected in: /opt/local/lib/libiconv.2.dylib
 in /Applications/sage/local/lib/libgd.2.dylib
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

Even things like 2+3 do not work. However, when I invoke sage as "sudo sage", everything works perfectly. What's wrong?

Justin C. Walker

unread,
Jul 9, 2012, 4:40:50 PM7/9/12
to sage-s...@googlegroups.com

On Jul 9, 2012, at 12:47 , Yuri Delanghe wrote:

> When I try to run sage, I get
>
> ImportError: dlopen(/Applications/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so, 2): Symbol not found: _iconv
> Referenced from: /Applications/sage/local/lib/libgd.2.dylib
> Expected in: /opt/local/lib/libiconv.2.dylib
> in /Applications/sage/local/lib/libgd.2.dylib
> Error importing ipy_profile_sage - perhaps you should run %upgrade?
> WARNING: Loading of ipy_profile_sage failed.

It appears that this is a flawed installation. We'd need a bit more information to be sure we're giving you the right help:
- OS/version (e.g. Mac OS X, 10.6.8)
- Hardware, CPU (e.g, MacBook Pro, Core i7)

One thing that is odd is that your installation is relying on libs in "/opt" (indicating MacPorts is installed). This is the problem, I think. Did you download a binary or build from source?

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------


Yuri Delanghe

unread,
Jul 9, 2012, 4:54:49 PM7/9/12
to sage-s...@googlegroups.com
OS X 10.7.4
MacBook Pro Intel Core i7

MacPorts is indeed installed, I installed sage from binary.


On Monday, July 9, 2012 1:47:04 PM UTC-6, Yuri Delanghe wrote:
When I try to run sage, I get

ImportError: dlopen(/Applications/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so, 2): Symbol not found: _iconv
  Referenced from: /Applications/sage/local/lib/libgd.2.dylib
  Expected in: /opt/local/lib/libiconv.2.dylib
 in /Applications/sage/local/lib/libgd.2.dylib
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

Even things like 2+3 do not work. However, when I invoke sage as "sudo sage", everything works perfectly. What's wrong?

Justin C. Walker

unread,
Jul 9, 2012, 5:07:01 PM7/9/12
to sage-s...@googlegroups.com

On Jul 9, 2012, at 13:54 , Yuri Delanghe wrote:

> OS X 10.7.4
> MacBook Pro Intel Core i7
>
> MacPorts is indeed installed, I installed sage from binary.

Oh, yuck. Looks like the binary was built on a system with MacPorts installed, which renders it kind of useless, I think.

From this outcome:

> On Monday, July 9, 2012 1:47:04 PM UTC-6, Yuri Delanghe wrote:
> When I try to run sage, I get
> ImportError: dlopen(/Applications/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so, 2): Symbol not found: _iconv
> Referenced from: /Applications/sage/local/lib/libgd.2.dylib
> Expected in: /opt/local/lib/libiconv.2.dylib
> in /Applications/sage/local/lib/libgd.2.dylib

recovery may be as simple as making a symlink from /usr/lib/libiconv.2.dylib to /opt/local/lib/libiconv.2.dylib.

if that doesn't work, you could build from source. You'll need Xcode 4.2/3 installed to do this. Or wait until someone builds a good Mac OS X binary.

Justin

--
Justin C. Walker
Curmudgeon-at-large
Director
Institute for the Absorption of Federal Funds
----
186,000 Miles per Second
Not just a good idea:
it's the law!
----

Keshav Kini

unread,
Jul 10, 2012, 12:13:13 AM7/10/12
to sage-s...@googlegroups.com, sage-...@googlegroups.com
"Justin C. Walker" <jus...@mac.com> writes:
> On Jul 9, 2012, at 13:54 , Yuri Delanghe wrote:
>> MacPorts is indeed installed, I installed sage from binary.
>
> Oh, yuck. Looks like the binary was built on a system with MacPorts installed, which renders it kind of useless, I think.
>
> From this outcome:
>
>> On Monday, July 9, 2012 1:47:04 PM UTC-6, Yuri Delanghe wrote:
>> When I try to run sage, I get
>> ImportError: dlopen(/Applications/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so, 2): Symbol not found: _iconv
>> Referenced from: /Applications/sage/local/lib/libgd.2.dylib
>> Expected in: /opt/local/lib/libiconv.2.dylib
>> in /Applications/sage/local/lib/libgd.2.dylib
>
> recovery may be as simple as making a symlink from /usr/lib/libiconv.2.dylib to /opt/local/lib/libiconv.2.dylib.
>
> if that doesn't work, you could build from source. You'll need Xcode 4.2/3 installed to do this. Or wait until someone builds a good Mac OS X binary.

Perhaps sage-devel should know about this - I've CC'd them.

What version of Sage is this? Which binary in particular did you download?

-Keshav

----
Join us in #sagemath on irc.freenode.net !

Reply all
Reply to author
Forward
0 new messages