反之亦然?
例如在 Gentoo 上安装 apt-get 并连接 Ubuntu 的存储库。
如果可能,我该怎么做?(至少在一般情况下)
我习惯于apt将下载的包存储在 中/var/cache/apt/archives/,但它不再这样做了,我不明白为什么。
恕我直言,配置已相应设置:
# apt-config dump | grep -i cache
Dir::Cache "var/cache/apt";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Binary::apt::APT::Cache "";
Binary::apt::APT::Cache::Show "";
Binary::apt::APT::Cache::Show::Version "2";
Binary::apt::APT::Cache::AllVersions "0";
Binary::apt::APT::Cache::ShowVirtuals "1";
Binary::apt::APT::Cache::Search "";
Binary::apt::APT::Cache::Search::Version "2";
Binary::apt::APT::Cache::ShowDependencyType "1";
Binary::apt::APT::Cache::ShowVersion "1";
Run Code Online (Sandbox Code Playgroud)
虽然我对那些东西一无所知Binary::*。
它似乎也与任何权限问题无关,因为/var/cache/apt/archives/在使用时会重新创建apt install <arbitrary-package>。
有什么提示吗?
我正在尝试在运行 Debian 5.0.9 (Lenny) 的 VM 上使用 apt-get install 安装一堆软件包。使这项努力令人沮丧和困难的是,我在这台机器上的主目录实际上是一个挂载的 NFS 共享。我的本地用户在 VM 的 sudoers 文件中,我可以开始安装所有软件包,但最终每次安装都失败,因为:
无法打开配置文件“/path/to/home/.dpkg.cfg”进行阅读:权限被拒绝。
我假设使用 sudo 运行 apt-get 使我充当 VM 的本地根目录,它对挂载我的主目录的 NFS 共享没有任何权限。因此,无法完成安装。
我已经尝试 sudo -s 解决这个问题,但我是:
抱歉,不允许用户 $user 在 $machine 上以 root 身份执行“/bin/bash”
我想知道是否有人可以提出任何替代方法来解决这个问题。
谢谢
当我遇到这个问题时,我试图安装其他东西。所以我尝试安装apt-utils来解决它。但是我无法安装 apt-utils,因为我的控制台告诉我我没有 apt-utils:
root@napajohn:~# apt-get install apt-utils
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
apt-utils
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
3 not fully installed or removed.
Need to get 0 B/129 kB of archives.
After this operation, 365 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
apt-utils
Install these packages without verification [y/N]? y
debconf: delaying package configuration, …Run Code Online (Sandbox Code Playgroud) 我目前在 Ubuntu 中使用R 2.15.3(安全毯)。R 3.0已经发布,但我无法使用 apt-get 更新到它。如果我从 cran 网站从 tar.gz 安装它会不会有什么问题?
我只是花了一个小时试图解决freeCAD从他们稍微过时的Wiki构建的依赖项。
有没有办法让我装在最后一个小时或一天包apt-get或aptitude?
我的第一次尝试是ls -t /var/apt/cache/archive列出带有奇怪日期的包。例如,我确定刚刚安装的一个python2.7-dev,被列为“2014 年 3 月 17 日”。今天唯一列出的是我今天早上做的一些安全更新。那里有从 2006 年开始标记的目录。很久以前我什至没有安装那个。
我也不能使用命令行历史记录,因为我混合使用了 apt-get install 和 aptitude。我也有几个终端,一段时间后历史变得很糟糕。
编辑:
@jmonrio 指出了一个很好的答案,但是当我只安装了一些软件包时,这给了我大量的软件包。它与我要求安装的内容与作为依赖链一部分安装的内容没有区别。
我有希望获得该历史记录的最小安装线吗?即没有自动包含的。
我最近刚刚在带有 Windows 7(64 位)主机的 Virtual Box 上安装了 Kali Linux 2.0(64 位)。我对 apt-get 有问题,这里的简单问题是,我该如何解决?
不幸的是,运行:“apt-get update”,返回错误信息如下:
(如果你看到一些不太正确的东西,我只是手动输入,因为我无法让桥接剪贴板工作。)
root@kali~# apt-get update
0% [Connecting to http.kali.org (192.99.200.113)}]
Run Code Online (Sandbox Code Playgroud)
“0%”消息会在那里停留 30 秒,然后在错误消息出现后消失。
Err http://http.kali.org sana InRelease
Err http://http.kali.org sana/updates InRelease
Err http://http.kali.org sna Release.gpg
Unable to connect to http.kali.org:http:
Segmentation fault
Reading package lists... Done
W: Failed to fetch http://http.kai.org/kali/dists/sana/InRelease
W: Failed to fetch http://http.kali.org/kalisecurity/dists/sana/updates/InRelease
W: Faied to fetch http://http.kali.org/kali/dists/sana/Release.gpg
Unable to connect to http.kali.org:http:
W: Some index files failed to download. They have been …Run Code Online (Sandbox Code Playgroud) 现在我的一台 VPS 出现问题。我的托管服务提供商向我声明,问题可能是由在我的 VPS(Ubuntu 14.04.1 LTS x64,OpenVZ)中执行 apt-get upgrade 引起的,这根本不是一个好主意。
我试图在网上找到任何支持这一观点的论据,但没有找到任何令人信服的论据。
在 OpenVZ 容器内进行 apt-get upgrade 真的是个坏主意吗?
我在一个小型 VPS 上安装了一个新的 Debian,现在当我尝试安装 sudo 时,我只是收到此消息。我还尝试将 FTP 服务器添加到列表中,但仍然收到该错误。
root@srv45758:~# vi /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ jessie main contrib non-free
deb http://ftp.de.debian.org/debian/ main contrib non-free
deb http://security.debian.org jessie/updates main contrib non-free
Run Code Online (Sandbox Code Playgroud)
有谁知道这个问题吗?
sudo apt-get install vlc
Reading package lists... Error!
E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory)
E: Could not open file - open (2: No such file or directory)
E: Problem opening
E: The package lists or status file could not be parsed or opened.
Run Code Online (Sandbox Code Playgroud)
每当我尝试安装任何软件时,都会出现此错误。我该如何解决这个问题?
apt-get ×10
linux ×5
ubuntu ×4
apt ×3
debian ×3
aptitude ×1
debian-lenny ×1
gentoo ×1
installation ×1
kali-linux ×1
nfs ×1
openvz ×1
permissions ×1
portage ×1
r ×1
repository ×1
sudo ×1
virtualbox ×1