无法在 Ubuntu 15.10 上安装 scsh

无法在 Ubuntu 15.10 上安装 scsh

尝试安装 scsh (不是ssh 和不是当我在 Ubuntu 15.10 上使用 Scheme Shell 时,我一直遇到依赖性错误,它不允许我这样做:

emd@luna:~$ sudo apt-get install scsh
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 scsh : Depends: scsh-0.6 but it is not installable
E: Unable to correct problems, you have held broken packages.
emd@luna:~$ 

查看我安装的系统对 scsh 的了解,我得到:

emd@luna:~$ sudo apt-cache search scsh
scsh - A `scheme' interpreter designed for writing system programs (default version)
scsh-0.6-doc - Documentation for scsh, "The Scheme Shell"
scsh-common-0.6 - A `scheme' interpreter designed for writing system programs
scsh-doc - Documentation for scsh, "The Scheme Shell"
scsh-install-lib - scsh package installer
scsh-0.6 - A `scheme' interpreter designed for writing system programs

关于 scsh-0.6 我得到:

emd@luna:~$ sudo apt-cache show scsh-0.6
Package: scsh-0.6
Priority: extra
Section: universe/interpreters
Installed-Size: 8148
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Scheme48 Maintainers Task Force <[email protected]>
Architecture: i386
Version: 0.6.7-8
Replaces: scsh (<= 0.6.6-3)
Depends: libc6 (>= 2.11), scsh-common-0.6 (= 0.6.7-8)
Suggests: scsh-0.6-doc
Conflicts: scsh (<= 0.6.6-3)
Filename: pool/universe/s/scsh-0.6/scsh-0.6_0.6.7-8_i386.deb
Size: 2996714
MD5sum: d736fabde3780e1fbab357ff12999887
SHA1: 97824c4f80f90e722b2be2fc0c77335fad293ed2
SHA256: c73e54f75506a431cd1672534b1760495a690b8688aee779410cead6fd395789
Description-en: A `scheme' interpreter designed for writing system programs
 Scsh has a high-level process notation for doing shell-script like
 tasks: running programs, establishing pipelines and I/O redirection.
 Scsh embeds this process notation within a full implementation of
 Scheme, a minimal and clean dialect of the Lisp programming language.
 The process notation is realized as a set of macro definitions, and
 is carefully designed to allow full integration with standard Scheme
 code. Scsh isn't Scheme-like; it is Scheme.
 .
 At the scripting level, scsh also has an Awk design, also implemented
 as a macro that can be embedded inside general Scheme code.
 .
 Scsh additionally provides the low-level access to the operating
 system normally associated with C. The current release provides full
 access to POSIX, plus important non-POSIX extensions, such as
 complete sockets support. "Full access to POSIX" means: fork, exec &
 wait, sockets, full read, write, open & close, seek & tell, complete
 file-system access, including stat, chmod/chgrp/chown, symlink, FIFO
 & directory access, tty & pty support, file locking, pipes, select,
 file-name pattern-matching, time & date, environment variables,
 signal handlers, and more.
Description-md5: 8ff47bffe440b87548670b2020e9a4db
Homepage: http://www.scsh.net/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

查看 scsh 的策略,我得到:

emd@luna:~$ sudo apt-cache policy scsh-0.6
scsh-0.6:i386:
  Installed: (none)
  Candidate: 0.6.7-8
  Version table:
     0.6.7-8 0
        500 http://mirror.team-cymru.org/ubuntu/ wily/universe i386 Packages

查看源镜像 URL,我看到以下有效的 URL:

  1. http://mirror.team-cymru.org/ubuntu/pool/universe/s/scsh-0.6/scsh-0.6_0.6.7-8_i386.deb
  2. http://mirror.team-cymru.org/ubuntu/pool/universe/s/scsh-0.6/scsh-0.6-doc_0.6.7-8_all.deb
  3. http://mirror.team-cymru.org/ubuntu/pool/universe/s/scsh-0.6/scsh-common-0.6_0.6.7-8_all.deb

尝试将它们作为一个块安装(下载后手动)- 我得到了这个:

emd@luna:~/Downloads$ sudo dpkg -i scsh*
Selecting previously unselected package scsh-0.6:i386.
(Reading database ... 220195 files and directories currently installed.)
Preparing to unpack scsh-0.6_0.6.7-8_i386.deb ...
Unpacking scsh-0.6:i386 (0.6.7-8) ...
Selecting previously unselected package scsh-0.6-doc.
Preparing to unpack scsh-0.6-doc_0.6.7-8_all.deb ...
Unpacking scsh-0.6-doc (0.6.7-8) ...
Selecting previously unselected package scsh-common-0.6.
Preparing to unpack scsh-common-0.6_0.6.7-8_all.deb ...
Unpacking scsh-common-0.6 (0.6.7-8) ...
dpkg: dependency problems prevent configuration of scsh-0.6:i386:
 scsh-0.6:i386 depends on scsh-common-0.6 (= 0.6.7-8).

dpkg: error processing package scsh-0.6:i386 (--install):
 dependency problems - leaving unconfigured
Setting up scsh-0.6-doc (0.6.7-8) ...
Setting up scsh-common-0.6 (0.6.7-8) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for doc-base (0.10.6) ...
Processing 3 added doc-base files...
Registering documents with scrollkeeper...
Errors were encountered while processing:
 scsh-0.6:i386

我的问题是:如何完整安装 scsh?

次要问题是:当出现此类问题时,我该如何解决?我还能做哪些进一步的调查?

更新:(更多信息)

查看 scsh-common,我看到了这一点:

emd@luna:~/Downloads$ sudo apt-cache show scsh-common-0.6
Package: scsh-common-0.6
Priority: extra
Section: universe/interpreters
Installed-Size: 1908
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Scheme48 Maintainers Task Force <[email protected]>
Architecture: all
Source: scsh-0.6
Version: 0.6.7-8
Replaces: scsh (<= 0.6.6-3)
Suggests: scsh-0.6-doc
Conflicts: scsh (<= 0.6.6-3)
Filename: pool/universe/s/scsh-0.6/scsh-common-0.6_0.6.7-8_all.deb
Size: 378248
MD5sum: e75d6b286a8490482bc410f32601e24e
SHA1: 3ee3fe160efe72d999f8dda1665163db725dc9f1
SHA256: ba74ac8d9dae76e988bdc60054b808f3a6e6a175c7d00724560187a2729870a8
Description-en: A `scheme' interpreter designed for writing system programs
 Scsh has a high-level process notation for doing shell-script like
 tasks: running programs, establishing pipelines and I/O redirection.
 Scsh embeds this process notation within a full implementation of
 Scheme, a minimal and clean dialect of the Lisp programming language.
 The process notation is realized as a set of macro definitions, and
 is carefully designed to allow full integration with standard Scheme
 code. Scsh isn't Scheme-like; it is Scheme.
 .
 At the scripting level, scsh also has an Awk design, also implemented
 as a macro that can be embedded inside general Scheme code.
 .
 Scsh additionally provides the low-level access to the operating
 system normally associated with C. The current release provides full
 access to POSIX, plus important non-POSIX extensions, such as
 complete sockets support. "Full access to POSIX" means: fork, exec &
 wait, sockets, full read, write, open & close, seek & tell, complete
 file-system access, including stat, chmod/chgrp/chown, symlink, FIFO
 & directory access, tty & pty support, file locking, pipes, select,
 file-name pattern-matching, time & date, environment variables,
 signal handlers, and more.
 .
 This package contains the architecture-independent files.
Description-md5: b67b8d361914d72dc0e5b30aaca2650b
Homepage: http://www.scsh.net/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

dpkg 的安装过程如下:

emd@luna:~/Downloads$ dpkg -l | sed -n '1,5p; /scsh/p'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                        Version                                    Architecture Description
+++-===========================================================-==========================================-============-===============================================================================
iU  scsh-0.6:i386                                               0.6.7-8                                    i386         A `scheme' interpreter designed for writing system programs
ii  scsh-0.6-doc                                                0.6.7-8                                    all          Documentation for scsh, "The Scheme Shell"
ii  scsh-common-0.6                                             0.6.7-8                                    all          A `scheme' interpreter designed for writing system programs

我看到的唯一区别是包 scsh 需要 scsh-common-0.6:i386 但是提供的包是 scsh-common-0.6:all……但这不应该有关系吧?

另外,我还在运行:

emd@luna:~/Downloads$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.10"
VERSION_ID="15.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
emd@luna:~/Downloads$ uname -a
Linux luna 4.2.0-23-generic #28-Ubuntu SMP Sun Dec 27 17:47:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

答案1

我对这个问题做了更多的研究,并找到了一个 Ubuntu漏洞针对此主题的 scsh 列出。此错误引用了 Debian漏洞关于该主题。问题是 amd64 平台上没有 scsh-0.6 版本。没有直接的 scsh 64 位版本。“修复”(如 Debian 错误报告中所示)是重新编译代码,强制它为 ia32 编译,尽管在 amd64 上运行。这会破坏其他代码,但当您需要它时,您就需要它。

进行了一些调整才使得源代码能够与 Wily 正确构建(补丁针对的是旧版本)。

构建 deb 文件后,使用以下命令安装它们:

dpkg -i scsh*.deb

最后,添加 /usr/bin/scsh:

cd /usr/bin
ln -s scsh-0.6 scsh

(我不知道为什么这最后一步不是自动化的。)

相关内容