在本问题末尾添加了附录,以回应 Stephen Kitt 的回答。
交叉发布:在渐近线(sourceforge)论坛上发布帖子没有什么乐趣。
在这篇文章中,我描述了我尝试执行该apt-get build-dep
命令以及执行该apt-update
命令时进行的实验。我想了解导致这些错误的原因,以及是否有补救措施(使用提取的源代码)。
在 Linux Mint 22 中,我安装了 VirtualBox 7 并创建了一个 Linux Mint 22 客户机,用于实验。在客户机中,我首先安装了 TexLive,然后从其源代码成功安装了 Latex 插件 Asymptote 3.00。为此,我必须首先安装以下软件包:
freeglut, cmake, libx11-dev, bison, flex, libgl1-mesa-dev, libglu1-mesa-dev zlib1g-dev
这次实验成功后,我恢复了刚安装 TexLive 并提取 Asymptote 3.00 源代码后拍摄的 VirtualBox 快照。作为第二次实验,我尝试简化该过程。有人建议我可以通过以下命令让单个安装处理依赖项:
apt-get build-dep asymptote
./configure
make all
make install
根据初步研究,我sudo xed
使用以下行更新了 \etc\apt\sources.list:
deb-src file:/home/steve/Downloads/asymptote-3.00 unstable main contrib
然后我导航到 /home/steve/Downloads/asymptote-3.00 并执行sudo apt-get build-dep asymptote
。此操作失败并显示以下消息:
$ sudo apt-get build-dep asymptote
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list
为了进行调查,我随后执行sudo apt update
了
Get:1 file:/home/steve/Downloads/asymptote-3.00 unstable InRelease
Ign:1 file:/home/steve/Downloads/asymptote-3.00 unstable InRelease
Get:2 file:/home/steve/Downloads/asymptote-3.00 unstable Release
Err:2 file:/home/steve/Downloads/asymptote-3.00 unstable Release
File not found - /home/steve/Downloads/asymptote-3.00/dists/unstable/Release (2: No such file or directory)
...
根据以上apt update
报告,我将sudo apt-get build-dep asymptote
附加的行替换为以下内容后重试:
deb-src file:/home/steve/Downloads/asymptote-3.00
这产生了
$ sudo apt-get build-dep asymptote
E: Malformed entry 8 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
E: Malformed entry 8 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
再次调查,我重新执行sudo apt update
,结果
$ sudo apt update
E: Malformed entry 8 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
进一步调查,asymptote 3.0 目录的完整子目录列表如下:
backports examples patches
base gc prc
build-scripts gl-matrix-2.4.0-pruned tests
cmake-preset-files GUI thirdparty_impl
cmake-scripts libatomic_ops tinyexr
cudareflect LspCpp webgl
cxxtests misc windows
doc
附录
我对 Stephen Kitt 的答案进行了测试验证。
读完他的回答并重新加载(之前的)VirtualBox 快照后,我发现而deb
不是deb-src
条目已经包含在内/etc/apt/sources.list.d/official-source-repositories.list
。
我已经确定在这种情况下,该apt-get build-dep asymptote
命令不起作用。必须将deb-src
条目添加到 中\etc\apt\sources.list
。根据他的回答,我将这五个deb-src
条目添加到 中\etc\apt\sources.list
。
然后,我执行了menu : software-sources : enable-source-code-repositories : update-cache
。
然后我执行了apt update
。
然后,我导航到提取的代码的目录asymptote
并执行apt-get build-dep asymptote
命令。
据推测,这工作得很好(即我在 10 分钟后中止,因为 VirtualBox 处理很慢,并且该过程增加了额外的 1+ gb 的包装)。
根据 Stephen Kitt 的回答中的评论,我重新执行了整个实验,但有一个例外:我没有将所有 5deb-src
行都添加到中\etc\apt\sources.list
,而是只添加了deb-src http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse
行。
这似乎也运行得很好。同样,出于同样的原因,我在 10 分钟后中止了 VirtualBox 的运行。
总的来说,这对我来说是一次很棒的学习经历。