运行sudo apt-get upgrade
时出现以下错误。我不知道如何修复此问题(我通常只使用 apt-get 进行安装和升级,不确定失败时如何修复)。
primes$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up sagemath-upstream-binary (7.0~aimsppa1~qa201602031255151) ...
Running Sage once as root to set paths
Rewriting paths for your new installation directory
===================================================
This might take a few minutes but only has to be done once.
patching /usr/lib/sagemath/src/build/cythonized/sage/rings/real_arb.c
Traceback (most recent call last):
File "/usr/lib/sagemath/relocate-once.py", line 85, in <module>
p('src/build/cythonized/sage/rings/real_arb.c').substitute().save()
File "/usr/lib/sagemath/relocate-once.py", line 70, in __call__
return FilePatch(self, filename)
File "/usr/lib/sagemath/relocate-once.py", line 21, in __init__
self.st = os.stat(filename)
OSError: [Errno 2] No such file or directory: '/usr/lib/sagemath/src/build/cythonized/sage/rings/real_arb.c'
┌────────────────────────────────────────────────────────────────────┐
│ SageMath Version 7.0, Release Date: 2016-01-19 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
ERROR: The Sage installation tree has moved
from /mnt/highperf/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma
to /usr/lib/sagemath
This is not supported, and Sage will not work. To install Sage from a
binary package:
1. Open the .tar.bz2 archive (or .dmg on OSX)
2. Move the SageMath folder/app to where you want it to be. You can also rename the directory now.
3. Start sage for the first time. This will then automatically patch paths in binaries.
After starting Sage for the first time you cannot change the
installation any more. To install Sage elsewhere, start over from the
binary package. Or recompile Sage from scratch in the new location
("make distclean && make")
dpkg: error processing package sagemath-upstream-binary (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
它确实列出了一些我可以尝试遵循的步骤,但不确定哪个 .tar.bz2 存档,也不确定我希望它在哪里,以便将来升级能够进行。
Linux 3.13.0-76-generic #120-Ubuntu SMP Mon Jan 18 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
答案1
在邮件列表上,其中一位 Sage 开发人员提到这是 7.0 的一个已知问题,应该很快就会修复。该帖子发布于 2016-02-04。
看来这个问题在7.0~aimsppa1~qa201602060140061
发布后已经修复了(即 2016-02-06)。我刚刚运行了一下apt-get update && apt-get upgrade
,发现这个问题确实已经修复了。