Re: [sage-support] Ubuntu 12.04 LTS Installation with Update Manager Fails for Sage 5.4.

706 views
Skip to first unread message

Jan Groenewald

unread,
Nov 13, 2012, 3:58:53 PM11/13/12
to sage-s...@googlegroups.com
Hi John,

Thanks for the report. I have not seen this error before, but 5.4 is only out for a day or two in the Ubuntu PPA now.

Would you mind running this command and sending the output back here?

sudo dpkg-reconfigure sagemath-upstream-binary

I'd like to see whether a terminal produces the same problem as the update-manager.

Regards,
Jan



On 13 November 2012 01:55, JJS137 <john.s...@gmail.com> wrote:
The Sage 5.4 installation on Ubuntu 12.04 LTS using Update Manager fails with the following messages:

installArchives() failed: (Reading database ...
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 717630 files and directories currently installed.)
Preparing to replace libav-tools 4:0.8.3-0ubuntu0.12.04.1 (using .../libav-tools_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libav-tools ...
Preparing to replace libpostproc52 4:0.8.3-0ubuntu0.12.04.1 (using .../libpostproc52_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libpostproc52 ...
Preparing to replace libavfilter2 4:0.8.3-0ubuntu0.12.04.1 (using .../libavfilter2_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libavfilter2 ...
Preparing to replace libswscale2 4:0.8.3-0ubuntu0.12.04.1 (using .../libswscale2_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libswscale2 ...
Preparing to replace libavdevice53 4:0.8.3-0ubuntu0.12.04.1 (using .../libavdevice53_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libavdevice53 ...
Preparing to replace libavformat53 4:0.8.3-0ubuntu0.12.04.1 (using .../libavformat53_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libavformat53 ...
Preparing to replace libavcodec53 4:0.8.3-0ubuntu0.12.04.1 (using .../libavcodec53_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libavcodec53 ...
Preparing to replace libavutil51 4:0.8.3-0ubuntu0.12.04.1 (using .../libavutil51_4%%3a0.8.4-0ubuntu0.12.04.1_i386.deb) ...
Unpacking replacement libavutil51 ...
Preparing to replace libproxy1-plugin-networkmanager 0.4.7-0ubuntu4 (using .../libproxy1-plugin-networkmanager_0.4.7-0ubuntu4.1_i386.deb) ...
Unpacking replacement libproxy1-plugin-networkmanager ...
Preparing to replace libproxy1-plugin-gsettings 0.4.7-0ubuntu4 (using .../libproxy1-plugin-gsettings_0.4.7-0ubuntu4.1_i386.deb) ...
Unpacking replacement libproxy1-plugin-gsettings ...
Preparing to replace libproxy1 0.4.7-0ubuntu4 (using .../libproxy1_0.4.7-0ubuntu4.1_i386.deb) ...
Unpacking replacement libproxy1 ...
Preparing to replace ffmpeg 4:0.8.3-0ubuntu0.12.04.1 (using .../ffmpeg_4%%3a0.8.4-0ubuntu0.12.04.1_all.deb) ...
Unpacking replacement ffmpeg ...
Preparing to replace sagemath-upstream-binary 5.1 (using .../sagemath-upstream-binary_5.4_i386.deb) ...
Unpacking replacement sagemath-upstream-binary ...
Preparing to replace python-libproxy 0.4.7-0ubuntu4 (using .../python-libproxy_0.4.7-0ubuntu4.1_all.deb) ...
Unpacking replacement python-libproxy ...
Processing triggers for man-db ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Setting up libavutil51 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libavcodec53 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libavformat53 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libavdevice53 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libswscale2 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libavfilter2 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libpostproc52 (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libav-tools (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up libproxy1 (0.4.7-0ubuntu4.1) ...
Setting up libproxy1-plugin-networkmanager (0.4.7-0ubuntu4.1) ...
Setting up libproxy1-plugin-gsettings (0.4.7-0ubuntu4.1) ...
Setting up ffmpeg (4:0.8.4-0ubuntu0.12.04.1) ...
Setting up sagemath-upstream-binary (5.4) ...
Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)
Running Sage once as root to set paths
Error: environment variable $HOME is not set.
Error setting environment variables by sourcing '/usr/lib/sagemath/spkg/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).
dpkg: error processing sagemath-upstream-binary (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Setting up python-libproxy (0.4.7-0ubuntu4.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 sagemath-upstream-binary
Error in function:
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Setting up sagemath-upstream-binary (5.4) ...
Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)
Running Sage once as root to set paths
Error: environment variable $HOME is not set.
Error setting environment variables by sourcing '/usr/lib/sagemath/spkg/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).
dpkg: error processing sagemath-upstream-binary (--configure):
 subprocess installed post-installation script returned error exit status 1

Is there a work around or fix for this problem?

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To post to this group, send email to sage-s...@googlegroups.com.
To unsubscribe from this group, send email to sage-support...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.





--
  .~.
  /V\     Jan Groenewald
 /( )\    www.aims.ac.za
 ^^-^^


JJS137

unread,
Nov 13, 2012, 6:01:43 PM11/13/12
to sage-s...@googlegroups.com
Hi Jan,
Thanks for the prompt response. The output to your command was:

jjs@jjs-laptop:~$ sudo dpkg-reconfigure sagemath-upstream-binary
[sudo] password for jjs:
/usr/sbin/dpkg-reconfigure: sagemath-upstream-binary is broken or not fully installed
jjs@jjs-laptop:~$

Cheers,
John

Jan Groenewald

unread,
Nov 13, 2012, 11:05:26 PM11/13/12
to sage-s...@googlegroups.com
Hi John,

On 14 November 2012 01:01, JJS137 <john.s...@gmail.com> wrote:
Hi Jan,
Thanks for the prompt response. The output to your command was:

jjs@jjs-laptop:~$ sudo dpkg-reconfigure sagemath-upstream-binary
[sudo] password for jjs:
/usr/sbin/dpkg-reconfigure: sagemath-upstream-binary is broken or not fully installed
jjs@jjs-laptop:~$

OK, I think in this case that should have been:

sudo dpkg --configure sagemath-upstream-binary

and perhaps even (which might not be necessary but can't hurt)

sudo apt-get -f install

Regards,
Jan

JJS137

unread,
Nov 13, 2012, 11:35:35 PM11/13/12
to sage-s...@googlegroups.com
Hi Jan,
It worked like a charm!

jjs@jjs-laptop:~$ sudo dpkg --configure sagemath-upstream-binary
[sudo] password for jjs:
Setting up sagemath-upstream-binary (5.4) ...
Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)
Running Sage once as root to set paths
----------------------------------------------------------------------
| Sage Version 5.4, Release Date: 2012-11-09                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
The Sage installation tree may have moved
(from /var/lib/buildbot/build/sage/arando-1/arando_binary/build/sage-5.4 to /usr/lib/sagemath).
Changing various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done resetting paths.
sage: Exiting Sage (CPU time 0m0.07s, Wall time 0m0.31s).
Exiting spawned Gap process.

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
jjs@jjs-laptop:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jjs@jjs-laptop:~$

Many Thanks,
Cheers,
John

Jan Groenewald

unread,
Nov 13, 2012, 11:45:40 PM11/13/12
to sage-s...@googlegroups.com
Hi John,

Great. Did you need ONLY the first command? Is Sage starting
and running OK? Is your launcher icon working?

The postinst script of the debian/ubuntu package runs configure:

        echo "Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)"
        rm -rf /usr/lib/sage
        echo "Running Sage once as root to set paths"
        echo 'exit' | DOT_SAGE=/root/.sage /usr/bin/sage

The first two lines will fall away in 5.5. I think there are too many packages called
"sage", and we're just looking for a nameclash in future. So I've changed the path.
Also the sage-optional ubuntu package or some other sage mechanism may have
left some files behind in the old path, and I wanted to clean them out.

We originally added that DOT_SAGE when the subshells running the postinst script
did not pick up which .sage folder to use, and there was a permissions problem.
I'm guessing from your inintial error that the update-manager (and perhaps software-centre)
is running a different kind of subhsell which is not picking up that /root/ is the HOME of the
root user. I will test this a bit by installing the package graphically, and perhaps adding
HOME=/root/ to that lastline above. Any other feedback from testers very welcome!

Regards,
Jan



--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To post to this group, send email to sage-s...@googlegroups.com.
To unsubscribe from this group, send email to sage-support...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
 
 

JJS137

unread,
Nov 14, 2012, 12:19:26 AM11/14/12
to sage-s...@googlegroups.com
Hi Jan,
I ran the second command but it did not find anything to do. The Launcher had some issue because the first command actually started Sage in my browser (Firefox). That instance worked fine. The launcher still has a problem, but the sign in page is presented when using the standard URL.
Many Thanks,
John

Setting up sagemath-upstream-binary (5.4) ...
Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)
Running Sage once as root to set paths

Error: environment variable $HOME is not set.
Error setting environment variables by sourcing '/usr/lib/sagemath/spkg/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).
dpkg: error processing sagemath-upstream-binary (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Setting up python-libproxy (0.4.7-0ubuntu4.1) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Errors were encountered while processing:
 sagemath-upstream-binary
Error in function:
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)

Setting up sagemath-upstream-binary (5.4) ...
Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)
Running Sage once as root to set paths

Error: environment variable $HOME is not set.
Error setting environment variables by sourcing '/usr/lib/sagemath/spkg/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).
dpkg: error processing sagemath-upstream-binary (--configure):
 subprocess installed post-installation script returned error exit status 1

Jan Groenewald

unread,
Nov 14, 2012, 12:24:00 AM11/14/12
to sage-s...@googlegroups.com
Hi John,

I'm guessing whatever launcher problem you have will go away
once you've rebooted.

Regards,
Jan


--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To post to this group, send email to sage-s...@googlegroups.com.
To unsubscribe from this group, send email to sage-support...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
 
 

Jan Groenewald

unread,
Nov 14, 2012, 4:54:54 AM11/14/12
to sage-s...@googlegroups.com
Dear KnS,

We are already busy testing a fix for this.

In the meantime, I don't see that your problem is directly related. In fact it is possibly something different altogether.

If your system is broken due to this error, then you will see the following output:

$ dpkg -l |grep sagemath-upstream-binary
iF  sagemath-upstream-binary                        5.4                                     Sage is a free open-source mathematics software system

If you don't see above, I think your error is unrelated. Can you try move .sage aside to .sage.backup and see whether you still get that error?

Regards,
Jan





On 14 November 2012 05:43, kannappan sampath <kntr...@gmail.com> wrote:
I am also facing the same problem while updating Sage from the Ubuntu PPA. Running sudo dpkg-reconfigure sagemath-upstream-binary produced the following output for me.


Removing previous path, rm -rf /usr/lib/sage (new path /usr/lib/sagemath)
Running Sage once as root to set paths
----------------------------------------------------------------------
| Sage Version 5.4, Release Date: 2012-11-09                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
sage: Exiting Sage (CPU time 0m0.07s, Wall time 0m0.07s).

When I try to run Sage on the terminal, I get a name error: sage_prompt is not defined. It also guesses that I might want to run %upgrade and I do this each time but to no avail. (Error message: Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed.)

Here is the Sage Crash Report: http://pastebin.com/tGuWA2Zz

Regards,
KnS

Kannappan Sampath

unread,
Nov 14, 2012, 6:15:55 AM11/14/12
to sage-s...@googlegroups.com
Dear Jan, 
I get the following message: 

ii  sagemath-upstream-binary                     5.4                                     
Sage is a free open-source mathematics software system

But, please do take a look at the Sage_Crash_report (the link to pastebin in my previous message). Thanks for responding promptly. 

On this note, I'd like to tell you that, I can run Sage with Sudo permissions but not otherwise. 

The status of the problem is as described here: http://ask.sagemath.org/question/1978/updating-to-54-from-ubuntu-ppa

Thank you. 

~KnS. 

Jan Groenewald

unread,
Nov 14, 2012, 6:45:03 AM11/14/12
to sage-s...@googlegroups.com
Hi KnS,

Please stop sage, try this command

sudo mv /home/knsam/.sage/tmp{.broken-permissions}

And try run sage again.

Kannappan Sampath

unread,
Nov 14, 2012, 7:15:34 AM11/14/12
to sage-s...@googlegroups.com
OK! Success! 

I have now moved .sage to .sage.backup and that fixed it... 
Regards, 

KnS

JJS137

unread,
Nov 14, 2012, 6:20:49 PM11/14/12
to sage-s...@googlegroups.com
Hi Jan,
You were correct - the launcher problem went away following my reboot this morning.
Many Thanks for your assistance!
Cheers,
John

Jan Groenewald

unread,
Nov 15, 2012, 3:01:57 PM11/15/12
to sage-s...@googlegroups.com
Hi

Solution to the Sagemath PPA upgrades to 5.4 via update-manager which does not read $HOME=/root/ correctly, and so
1) fails to configure the package and 2) possibly writes files owned by root into the user's .sage.

The Sagemath PPA has been updated to 5.4ubuntu1, which does not present the problem with update-manager installations.
Future upgrades from 5.1 to 5.4ubuntu1 should work as expected.

However, installations which were already upgraded from 5.1 to 5.4 with the PPA can only be fixed by running this in a terminal to fix the package manager:

sudo dpkg --configure sagemath-upstream-binary

Update manager will then continue to pull the new 5.4ubuntu1 and that should work.
If problems persist due to sage startup showing permission errors, then run this as the user:

sudo mv /home/`whoami`/.sage/tmp{.,broken-permissions}

Regards,
Jan

Jan Groenewald

unread,
Nov 16, 2012, 4:14:14 AM11/16/12
to sage-s...@googlegroups.com, Waseem Elliot
Hi

I found a completely GUI based way to fix the problem. If you have taken an update-manager
update of sagemath-upstream-binary 5.1 -> 5.4 and it leaves the package in an unconfigured
state, you can open Software Centre, search for sagemath, choose sagemath-upstream-binary,
click Remove, and then when it is done click Install.

(update-manager does not try to remove it first, and the upgrade will not work while there is an
unconfigured package. I suspect this might work with synaptic as well. Note that if the user
ran sudo sage after update-manager failed to configure the package, then I think that is
what caused the second half of the problem: root-owned files in .sage/tmp. These I guess
will have to be moved on the command line.)

Regards,
Jan
Reply all
Reply to author
Forward
0 new messages