AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-112507

user2661923's questions

Martin Hope
user2661923
Asked: 2025-03-16 02:33:47 +0800 CST

了解 apt-get build-dep 过程

  • 6

在本问题末尾添加了附录,以回应 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 的运行。

总的来说,这对我来说是一次很棒的学习经历。

linux-mint
  • 1 个回答
  • 42 Views
Martin Hope
user2661923
Asked: 2019-03-25 15:40:11 +0800 CST

加速视频转换

  • -1

我喜欢在将大型视频文件存储到硬盘之前对其进行压缩。在 Fedora-29-bash 中,我目前使用以下 ffmpeg 命令进行重新编码;它平衡了压缩和质量:

ffmpeg -i $in_path -b:v 960k -bufsize 9600k -strict -2 $out_path

对运行时间为 30 分钟的 2gb 视频文件执行上述命令时,执行时间约为 20 分钟。我的硬件显示在此查询的末尾。 可以加快此视频重新编码的速度吗?

换句话说,如果我放弃 ffmpeg 转而使用任何其他软件(例如手刹),我会获得更快的重新编码吗?根据我通过 bash(例如 cp 或 rsync 命令)与使用(nemo)文件管理器复制文件的经验,我的直觉是没有什么能比 bash-ffmpeg 性能更好。

我提交此查询只是为了仔细检查我的直觉。

我的硬件

os         :  64 bit fedora 29
cpu        :  Intel I5-4440 Processor BX80646I54440
mobo       :  (64 bit) Gigabyte H97 SATA Express M.2 SSD UEFI DualBIOS  
           :  DDR3 1600 LGA
memory     :  32 gb : 2 x [G.Skill F3-1600C10D-16GAO Ares 16GB (2x8GB) 
           :  DDR3-1600Mhz Memory RAM]
psu        :  corsair cx series 600 watt
hdisk      :  1tb internal western digital wd10ezex sata
video card :  none - I use mobo's onboard video at 1920x1080.
sound card :  none - I use mobo's onboard audio
ffmpeg video-encoding
  • 1 个回答
  • 69 Views
Martin Hope
user2661923
Asked: 2018-11-18 16:58:32 +0800 CST

Fedora 29 VirtualBox 安装故障

  • 0

我发现的唯一 Fedora 29 特定说明位于此链接: https ://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-哈特莱尔/

由于该链接显然侧重于客人添加,因此我决定忽略它。

一年前,我按照类似于以下链接的说明在 Fedora 26 中成功安装了 VirtualBox:https ://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-在 Fedora-centos-red-hat-rhel/

由于我找不到专门针对 Fedora 29 的相应说明,因此我尝试遵循相同的说明。首先,我执行了以下命令:

dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

尽管该命令似乎正常完成,但它确实显示了以下消息:

Failed to synchronize cache for repo 'virtualbox', ignoring this repo.

然后我执行:

dnf install VirtualBox-5.2

结果:

Fedora 29 - x86_64 - VirtualBox                                               
Failed to synchronize cache for repo 'virtualbox', ignoring this repo.
Last metadata expiration check: 0:05:45 ago on Sat 17 Nov 2018 03:40:42 PM PST.
No match for argument: VirtualBox-5.2
Error: Unable to find a match

我不确定这是否相关,但出于好奇,我执行了

cd /
find -type f -iname "virtualbox.*"
find -type f -iname "virtualbox*" 

结果:

./var/cache/PackageKit/29/metadata/updates-29-x86_64/packages/virtualbox-guest-additions-5.2.20-1.fc29.x86_64.rpm
./var/cache/PackageKit/29/metadata/updates-29-x86_64/packages/virtualbox-guest-additions-5.2.22-1.fc29.x86_64.rpm

似乎 Fedora 29(完整安装,而不是升级)正在安装一些 VirtualBox Guest-Addition rpm。一旦我安装了 VirtualBox,我将发布一个单独的查询我应该做些什么来安装来宾添加。我在这篇文章中提到它只是因为它可能与我的具体问题有关。

同样,我不确定以下链接是否相关: VirtualBox failed to install in Fedora 26

在那个链接中,我犯了一个错误,并在我进行安装之前得到了 UnixSE 的回复,要求我退出我的错误。

问题:

  1. 为什么我收到消息“无法同步 repo virtualbox 的缓存”?

  2. 为什么我收到消息“参数不匹配:VirtualBox-5.2”?

  3. 在继续安装之前,我需要退出任何内容吗?

  4. 如何在 Fedora 29 中安装 VirtualBox。

fedora software-installation
  • 1 个回答
  • 2259 Views
Martin Hope
user2661923
Asked: 2017-12-10 03:04:44 +0800 CST

双启动 fedora 26(已安装)和 Windows 7

  • 2

我已经在一个 1tb 硬盘上安装了 fedora 26,目前使用的空间不到 100gb,我想将硬盘转换为双启动,并为 Windows 7 分配 300gb。我很喜欢在 bash 终端中使用 parted,但我从未使用过 parted (resize) 命令。我已经备份了我的数据,并且我有一个 Fedora26 Live(安装)闪存驱动器和一个单独的 Windows 7 安装闪存驱动器。在我的电脑冷启动期间,我可以通过 F12 键使用任一闪存驱动器启动。下面显示的是我打算采取的一般步骤,然后是我的问题。我请求帮助解决这些问题。

脚步

 1. Boot from the Fedora 26 Live installation, leaving the 1tb hard disk 
    unmounted.

 2. Within Fedora 26 Live, use lsblk to determine the device name given to the 
    1tb partition.  Then use parted in a bash terminal to resize this partition.
    Shown below is the parted (print) output of the 1tb partition.

    (parted) print                                                            
    Model: ATA WDC WD10EZEX-00W (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
    Disk Flags: 

    Number  Start   End     Size    Type     File system  Flags
     1      1049kB  1075MB  1074MB  primary  ext4         boot
     2      1075MB  1000GB  999GB   primary               lvm

    Assuming that lsblk indicates that the 1tb partition is assigned to 
    /dev/sdb, I plan to execute the following in a bash terminal

    sudo parted /dev/sdb
    < RESIZE COMMAND GOES HERE >
    quit

 3. Still within Fedora 26 Live, quit parted, re-execute lsblk, and then use
    parted on the 300 gb remaining to create a Windows 7 partition.  Assuming   
    that lsblk now indicates that the 300 gb is assigned to /dev/sdc, I
    will then execute the following in a bash terminal:

    sudo parted /dev/sdc
    mklabel msdos
    mkpart primary ntfs 1MiB 100%
    quit

 4. Power off and then cold boot with the Windows 7 installation flashdrive.
    During the installation, select the 300gb (unformatted) partition.

 5. SOMEHOW, install grub on the 1tb hard disk.  My intention is that when I
    hit F12 during a cold boot and select the 1tb hard disk, grub will then 
    present the option to boot into either Fedora 26 or Windows 7.

问题

a.  Are these the right steps to take, in the right order?

b.  In step 2 above, what is the syntax needed for the resize command?

c.  How do I install and configure grub on the 1tb hard disk?

d.  Should I expect the (now 700gb) Fedora 26 environment to be unaffected, 
    except for the reduced space?

e.  (Slightly off topic) Does the 300gb partition need to be pre-formatted, or 
    flagged as bootable, or will the Windows 7 installation flashdrive handle
    this?
partition fedora
  • 2 个回答
  • 868 Views
Martin Hope
user2661923
Asked: 2017-12-02 03:11:57 +0800 CST

VirtualBox 无法在 Fedora 26 中安装

  • 0

我按照https://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel上的 Fedora 26 安装说明遇到了问题/

在网页的第 5 步中,该dnf install VirtualBox-5.2命令导致出现错误消息,我在本论坛查询末尾给出了这些消息。由于我不明白这些消息的意义,我继续执行第 5 步/usr/lib/virtualbox/vboxdrv.sh setup命令。该命令失败;该/usr/lib/virtualbox/目录现在不存在。

我知道为什么会出现问题,但不知道如何解决。 几个月前,我安装了Fedora-Workstation-Live-x86_64-26-1.5.iso,然后手动执行dnf install @cinnamon-desktop,然后是dnf install VirtualBox. 当时,我没有执行任何其他与VirtualBox Installation相关的命令。VirtualBox 没有显示在 cinnamon 启动菜单中,后来我忘记了我已经安装了它。 我请求帮助解开这个烂摊子。

***************************  start of messages  ********************************

[root@ip98-167-107-31 yum.repos.d]# dnf install VirtualBox-5.2
Last metadata expiration check: 0:17:20 ago on Fri 01 Dec 2017 01:09:48 AM PST.

dependencies resolved.

=================================================================================================================
 Package                    Arch               Version                              Repository              Size
=================================================================================================================
Installing:
 VirtualBox-5.2             x86_64             5.2.2_119230_fedora26-1              virtualbox              70 M

Transaction Summary
=================================================================================================================
Install  1 Package

Total download size: 70 M
Installed size: 154 M
Is this ok [y/N]: y
Downloading Packages:
VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64.rpm                                 15 MB/s |  70 MB     00:04    
-----------------------------------------------------------------------------------------------------------------

Total                                                                             15 MB/s |  70 MB     00:04     
warning: /var/cache/dnf/virtualbox-4917f85f98c326df/packages/VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64.rpm: Header V4 DSA/SHA1     Signature,     key ID 98ab5139: NOKEY
Importing GPG key 0x98AB5139:
 Userid     : "Oracle Corporation (VirtualBox archive signing key) <[email protected]>"
 Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
 From       : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Key imported successfully
Running transaction check
    Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/bin/VBox from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/bin/VBoxTunctl from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/bin/vbox-img from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/128x128/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/16x16/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/20x20/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/32x32/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/40x40/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/48x48/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/icons/hicolor/64x64/apps/virtualbox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/mime/packages/virtualbox.xml from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-server-5.1.30-2.fc26.x86_64
  file /usr/share/applications/virtualbox.desktop from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-5.1.30-2.fc26.x86_64
  file /usr/share/pixmaps/VBox.png from install of VirtualBox-5.2-5.2.2_119230_fedora26-1.x86_64 conflicts with file from package VirtualBox-5.1.30-2.fc26.x86_64

Error Summary
-------------

[root@ip98-167-107-31 yum.repos.d]# 
fedora software-installation
  • 2 个回答
  • 1972 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve