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
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[linux-headers](ubuntu)

Martin Hope
Alexander Gharibashvili
Asked: 2020-03-19 10:15:38 +0800 CST

我的 Ubuntu 遇到 ACPI 错误。也加载不出来

  • 0

更新后,每次打开笔记本电脑时都会出现此错误。 之后我得到黑屏,几个小时都没有加载......

另外,如果我按 SHIFT 进入 GRUB 菜单,我会得到几个版本的 Linux,只有在我选择 Ubuntu 时,使用 Linux 5.3.0-42-generic,我无法加载我的系统。该怎么办 ?

grub2 acpi linux-headers
  • 1 个回答
  • 309 Views
Martin Hope
mikepurvis
Asked: 2020-03-06 17:18:50 +0800 CST

如何添加自定义内核风味?

  • 2

出于多种原因,我需要为其他标准的 x86 Ubuntu 16.04 系统构建自定义内核。按照这些说明,我通过以下调用成功构建了我需要的软件包套件:

fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false do_tool=true

然而,作为这项工作的下一步,我想知道做一些事情,比如减少不需要的驱动程序的数量,包括我目前使用 dh_dkms 包安装的一些补丁等。我觉得即使是我自己使用,它也会如果这些更改可以在内部发布而不是在标准的“通用”名称下发布,那么最好是针对我公司的半嵌入式用例的新风格/配置。

不过,我发现 Ubuntu 内核存储库(例如 git://kernel.ubuntu.com/ubuntu/ubuntu-disco.git)有点难以导航,而且它似乎与 Debian 的做法有很大不同,他们的关于内核构建的文档也不是很有帮助。

所以我的问题是:这个 repo 中定义的风格及其配置(或配置默认值)在哪里?看起来它可能已经在 中debian.master/control.d/vars.<flavourname>,但是在那里添加一个新文件并没有使binary-<flavourname>构建目标可用,也没有改变任何fakeroot debian/rules editconfigs行为方式。

谢谢。

compiling kernel linux-headers
  • 1 个回答
  • 695 Views
Martin Hope
Schierke
Asked: 2020-02-05 13:36:13 +0800 CST

无法安装 Linux 标头 (5.5.1)

  • 1

我正在关注一个关于如何为我正在学习的课程创建 Linux 内核模块的简单教程,其中一个步骤要求我使用安装必要的内核头文件

sudo apt-get install linux-headers-`uname -r`

当我尝试这样做时,我收到以下错误

E: Unable to locate package linux-headers-5.5.1-CS369
E: Couldn't find any package by glob 'linux-headers-5.5.1-CS369'
E: Couldn't find any package by regex 'linux-headers-5.5.1-CS369'

(注意:'-CS369' 是我们被要求使用 menuconfig 为内核创建的本地版本字符串)

我最初认为我的本地版本字符串正在制作它,所以我找不到标题但是当我“apt-cache search linux-headers”时,我没有得到任何 5.5.1 标题,只有 'linux-headers-4.1. 5 到 linux-headers-5.3.0 。有人知道为什么我无法安装我需要的标头吗?

版本:Ubuntu 18.04.3

编辑:我对这一切都很陌生,并试图了解这一切是如何运作的。如果这不是问这个问题的合适地方,我深表歉意。

package-management kernel apt linux-headers
  • 1 个回答
  • 1789 Views
Martin Hope
ElisaFo
Asked: 2019-06-13 04:45:04 +0800 CST

为什么环境变量在 Linux 中没有返回?

  • 3

在windows中设置一个新的变量=值我们可以简单地将它添加到环境变量中。但是,在linux中,看起来有点难。这是我遵循的程序:

打开终端并写入:

vim ~/.bashrc  

然后按键盘“i”,然后定义变量如下:

Test_MyVariable='Tessst'
export Test_MyVariable
PATH=$PATH:Test_MyVariable/bin

然后:wq

在 $echo 之后,我看到了变量:

echo $Test_MyVariable 

它返回:

测试

但在我崇高的文本中,它返回无。

import os
new_v= os.environ.get('Test_MyVariable')
print(new_v)

没有任何

我什至检查了所有可用的 os.environ 但我找不到我的Test_MyVariable. 此外,我还尝试使用~/.bash_profileand~/.profile并向它们添加变量,但结果相同。请告诉我我做错了什么?

vim command-line bash environment-variables linux-headers
  • 1 个回答
  • 5051 Views
Martin Hope
Reto Höhener
Asked: 2019-05-09 13:45:50 +0800 CST

为什么 /usr/src/linux-aws-headers* 增长?

  • 21

有人可以提供一些背景吗?

即使我没有更新或安装任何软件包,这个文件夹似乎也在增长,但我对此并不完全确定。

上下文:我的 AWS 实例一直在用完磁盘空间,我已经学会了定期执行此操作:

apt-get -y autoremove
apt-get -y autoclean

但我不明白为什么它首先会增长。

另见:

  • 清除较旧的 linux 映像后是否可以安全删除 /usr/src/linux-headers?
  • 为什么有这么多 linux-headers,即使是缺少图像

编辑:在我的新服务器上,我得到了这个:

du -h -d1 /usr/src/ | sort -hr
266M  /usr/src/
115M  /usr/src/linux-aws-headers-4.15.0-1035
115M  /usr/src/linux-aws-headers-4.15.0-1032
19M   /usr/src/linux-headers-4.15.0-1035-aws
19M   /usr/src/linux-headers-4.15.0-1032-aws
16.04 linux-headers 18.04
  • 1 个回答
  • 10342 Views
Martin Hope
David Corbin
Asked: 2019-01-04 09:40:51 +0800 CST

找不到 4.10.0-28-generic 的 linux 头文件

  • 0

Ubuntu 无法找到 4.10.0-28 的通用 linux 头文件。我能做些什么来解决这个问题?

截屏

的输出cat /etc/apt/sources.list

remus@linux:/var/log$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
apt linux-headers 18.04
  • 2 个回答
  • 924 Views
Martin Hope
miceandmon
Asked: 2018-10-19 17:25:34 +0800 CST

对 udev_new 的未定义引用

  • 1

我目前正在尝试测试我在 Qt 上编写的 c++ 代码,我下载了 libudev,它不断给出很多“未定义的引用”。我几乎关注了所有升级libudev的帖子,

sudo apt-get install libudev0:i386
sudo ln -sf /lib/$(arch)-linux-gnu/libudev.so.1 /lib/$(arch)-linux-gnu/libudev.so.0

和这篇文章.Error来自这个:

dpkg: error processing archive libudev0_175-0ubuntu9_amd64.deb
dkpk: error processing archive libudev0_175-0ubuntu9_amd64.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
libudev0_175-0ubuntu9_amd64.deb

我还没有运气。大多数时候我得到“目录不存在”错误。这与我的 Ubuntu 版本有关吗?

libraries udev 16.04 linux-headers
  • 1 个回答
  • 2249 Views
Martin Hope
datacubed
Asked: 2018-10-16 02:02:20 +0800 CST

尝试为某些更新腾出空间,但没有尝试删除/清除的依赖问题

  • 0

我使用 ansible 部署到我的服务器,其中一部分在我开始安装/更新软件包之前运行一堆“更新”命令。我最近收到一个关于磁盘空间的错误,但似乎在试图修复它,下面是我能想到的尽可能多的信息,以提供关于发生了什么的信息。

启动错误:

sudo apt-get --fix-broken install -y

给出以下内容:

sudo: 无法解析主机 myserver-001 正在
读取包列表...完成
构建依赖关系树正在
读取状态信息...完成正在
纠正依赖项...完成
将安装以下额外包: linux
-headers-3.13.0-160
将安装以下新软件包:
linux-headers-3.13.0-160
0 升级,1 新安装,0 删除和 0 未升级。
4 未完全安装或拆除。
需要获得 0 B/8,911 kB 的档案。
此操作后,将使用 63.6 MB 的额外磁盘空间。
(正在读取数据库...当前安装的 505365 个文件和目录。)
正在准备解包 .../linux-headers-3.13.0-160_3.13.0-160.210_all.deb ... 正在解包
linux-headers-3.13.0-160 (3.13.0-160.210) ...
dpkg: 错误处理存档/var/cache/apt/archives/linux-headers-3.13.0-160_3.13.0-160.210_all.deb(--unpack):
错误创建目录`./usr/src/linux-headers-3.13.0- 160/drivers/staging/lustre/lustre/osc': No space left on device
没有写入 apport 报告,因为错误消息表明磁盘已满错误
dpkg-deb: error: subprocess paste is killed by signal (Broken pipe)
遇到错误处理时:
/var/cache/apt/archives/linux-headers-3.13.0-160_3.13.0-160.210_all.deb
E: 子进程 /usr/bin/dpkg 返回错误代码 (1)

对我来说,重要的部分是:

error creating directory `./usr/src/linux-headers-3.13.0-160/drivers/staging/lustre/lustre/osc': No space left on device  

没有写入报告报告,因为错误消息指示磁盘已满错误

所以,经过一番谷歌搜索,我最终找到了这些地方:/boot 和 /usr/src/,并检查了 innodes

df /启动 | df /usr/src:

Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda1       8115168 5474876   2205016  72% /

df -i:

Filesystem     Inodes  IUsed  IFree IUse% Mounted on
udev           480531    391 480140    1% /dev
tmpfs          481833    312 481521    1% /run
/dev/xvda1     524288 521345   2943  100% /
none           481833      2 481831    1% /sys/fs/cgroup
none           481833      1 481832    1% /run/lock
none           481833      1 481832    1% /run/shm
none           481833      2 481831    1% /run/user
/dev/xvdb      262144     11 262133    1% /mnt

unname -r:

3.13.0-158-generic

我不擅长这些东西,因此试图提供尽可能多的信息。如果其中任何一个没用,我深表歉意。

在 /usr/src 我有很多 linux-headers:

drwxr-xr-x 24 根 4096 2016 年 11 月 24 日 linux-headers-3.13.0-101
drwxr-xr-x 7 根 4096 2016 年 11 月 24 日 linux-headers-3.13.0-101-通用
drwxr-xr-x 24根根 4096 2017 年 1 月 20 日 linux-headers-3.13.0-107
drwxr-xr-x 7 根根 4096 2017 年 1 月 20 日 linux-headers-3.13.0-107-generic
drwxr-xr-x 24 根 4096 2017 年 3 月 9 日linux-headers-3.13.0-112
drwxr-xr-x 7 根 4096 2017 年 3 月 9 日 linux-headers-3.13.0-112-generic
drwxr-xr-x 24 根 4096 2017 年 4 月 7 日 linux-headers-3.13。 0-116
drwxr-xr-x 7 根 4096 2017 年 4 月 7 日 linux-headers-3.13.0-116-generic
drwxr-xr-x 24 根 4096 2017 年 5 月 4 日 linux-headers-3.13.0-117
drwxr-xr -x 7 root root 4096 2017 年 5 月 4 日 linux-headers-3.13.0-117-generic
drwxr-xr-x 24 root root 4096 2017 年 5 月 18 日 linux-headers-3.13.0-119
drwxr-xr-x 7 root root 4096 2017 年 5 月 18 日 linux-headers-3.13.0-119-generic
drwxr-xr-x 24根根 4096 2017 年 6 月 22 日 linux-headers-3.13.0-121
drwxr-xr-x 7 根根 4096 2017 年 6 月 22 日 linux-headers-3.13.0-121-generic
drwxr-xr-x 24 根 4096 2017 年 7 月 7 日linux-headers-3.13.0-123
drwxr-xr-x 7 根 4096 2017 年 7 月 7 日 linux-headers-3.13.0-123-generic
drwxr-xr-x 24 根 4096 2017 年 7 月 18 日 linux-headers-3.13。 0-125
drwxr-xr-x 7 根 4096 2017 年 7 月 18 日 linux-headers-3.13.0-125-generic
drwxr-xr-x 24 根 4096 2017 年 8 月 31 日 linux-headers-3.13.0-129
drwxr-xr -x 7 root root 4096 2017 年 8 月 31 日 linux-headers-3.13.0-129-generic
drwxr-xr-x 24 根 4096 2018 年 1 月 25 日 linux-headers-3.13.0-141
drwxr-xr-x 7 根 4096 2018 年 1 月 25 日 linux-headers-3.13.0-141-通用
drwxr-xr-x 24根根 4096 2018 年 2 月 22 日 linux-headers-3.13.0-142
drwxr-xr-x 7 根根 4096 2018 年 2 月 22 日 linux-headers-3.13.0-142-generic
drwxr-xr-x 24 根 4096 2018 年 3 月 27 日linux-headers-3.13.0-143
drwxr-xr-x 7 root root 4096 2018 年 3 月 27 日 linux-headers-3.13.0-143-generic
drwxr-xr-x 24 root root 4096 Apr 27 13:47 linux-headers- 3.13.0-145
drwxr-xr-x 7 root root 4096 Apr 27 13:47 linux-headers-3.13.0-145-generic
drwxr-xr-x 24 root root 4096 5 月 14 日 11:11 linux-headers-3.13。 0-147
drwxr-xr-x 7 根 4096 5 月 14 日 11:11 linux-headers-3.13.0-147-generic
drwxr-xr-x 24 root root 4096 5 月 23 日 11:04 linux-headers-3.13.0-149
drwxr-xr-x 7 root root 4096 5 月 23 日 11:04 linux-headers-3.13.0-149-generic
drwxr- xr-x 24 root root 4096 Sep 12 15:19 linux-headers-3.13.0-158
drwxr-xr-x 7 root root 4096 Sep 12 15:19 linux-headers-3.13.0-158-generic
drwxr-xr- x 7 root root 4096 Oct 12 11:15 linux-headers-3.13.0-160-generic
drwxr-xr-x 24 root root 4096 Mar 25 2015 linux-headers-3.13.0-48
drwxr-xr-x 7 root root 4096 2015 年 3 月 25 日 linux-headers-3.13.0-48-generic

我假设我不需要其中的很多,但是当我尝试卸载 2015 内核时,我得到了与以前相同的错误,这是抱怨最新的并且它无法安装其依赖项的事实:

sudo apt-get remove linux-headers-3.13.0-48

sudo: 无法解析主机 myserver-001 正在
读取包列表...完成
构建依赖关系树正在
读取状态信息...完成
您可能需要运行 'apt-get -f install' 来更正这些问题:
以下包具有未满足的依赖项:
linux-headers-3.13.0-160-generic :取决于:linux-headers-3.13.0-160 但不会安装
linux-headers-3.13.0-48-generic :取决于:linux-headers-3.13 .0-48 但不会安装
E:未满足的依赖项。尝试不带软件包的“apt-get -f install”(或指定解决方案)。

如果我尝试“apt-get -f install”,我会收到与以前一样的关于没有空间的消息。

/启动 ls

 abi-3.13.0-101-generic     config-3.13.0-149-generic      System.map-3.13.0-117-generic
 abi-3.13.0-107-generic     config-3.13.0-158-generic      System.map-3.13.0-119-generic
 abi-3.13.0-112-generic     config-3.13.0-160-generic      System.map-3.13.0-121-generic
 abi-3.13.0-116-generic     config-3.13.0-48-generic       System.map-3.13.0-123-generic
 abi-3.13.0-117-generic     grub                           System.map-3.13.0-125-generic
 abi-3.13.0-119-generic     initrd.img-3.13.0-101-generic  System.map-3.13.0-129-generic
 abi-3.13.0-121-generic     initrd.img-3.13.0-107-generic  System.map-3.13.0-141-generic
 abi-3.13.0-123-generic     initrd.img-3.13.0-112-generic  System.map-3.13.0-142-generic
 abi-3.13.0-125-generic     initrd.img-3.13.0-116-generic  System.map-3.13.0-143-generic
 abi-3.13.0-129-generic     initrd.img-3.13.0-117-generic  System.map-3.13.0-145-generic
 abi-3.13.0-141-generic     initrd.img-3.13.0-119-generic  System.map-3.13.0-147-generic
 abi-3.13.0-142-generic     initrd.img-3.13.0-121-generic  System.map-3.13.0-149-generic
 abi-3.13.0-143-generic     initrd.img-3.13.0-123-generic  System.map-3.13.0-158-generic
 abi-3.13.0-145-generic     initrd.img-3.13.0-125-generic  System.map-3.13.0-160-generic
 abi-3.13.0-147-generic     initrd.img-3.13.0-129-generic  System.map-3.13.0-48-generic
 abi-3.13.0-149-generic     initrd.img-3.13.0-141-generic  vmlinuz-3.13.0-101-generic
 abi-3.13.0-158-generic     initrd.img-3.13.0-142-generic  vmlinuz-3.13.0-107-generic
 abi-3.13.0-160-generic     initrd.img-3.13.0-143-generic  vmlinuz-3.13.0-112-generic
 abi-3.13.0-48-generic      initrd.img-3.13.0-145-generic  vmlinuz-3.13.0-116-generic
 config-3.13.0-101-generic  initrd.img-3.13.0-147-generic  vmlinuz-3.13.0-117-generic
 config-3.13.0-107-generic  initrd.img-3.13.0-149-generic  vmlinuz-3.13.0-119-generic
 config-3.13.0-112-generic  initrd.img-3.13.0-158-generic  vmlinuz-3.13.0-121-generic
 config-3.13.0-116-generic  initrd.img-3.13.0-160-generic  vmlinuz-3.13.0-123-generic
 config-3.13.0-117-generic  initrd.img-3.13.0-48-generic   vmlinuz-3.13.0-125-generic
 config-3.13.0-119-generic  retpoline-3.13.0-143-generic   vmlinuz-3.13.0-129-generic
 config-3.13.0-121-generic  retpoline-3.13.0-145-generic   vmlinuz-3.13.0-141-generic
 config-3.13.0-123-generic  retpoline-3.13.0-147-generic   vmlinuz-3.13.0-142-generic
 config-3.13.0-125-generic  retpoline-3.13.0-149-generic   vmlinuz-3.13.0-143-generic
 config-3.13.0-129-generic  retpoline-3.13.0-158-generic   vmlinuz-3.13.0-145-generic
 config-3.13.0-141-generic  retpoline-3.13.0-160-generic   vmlinuz-3.13.0-147-generic
 config-3.13.0-142-generic  System.map-3.13.0-101-generic  vmlinuz-3.13.0-149-generic
 config-3.13.0-143-generic  System.map-3.13.0-107-generic  vmlinuz-3.13.0-158-generic
 config-3.13.0-145-generic  System.map-3.13.0-112-generic  vmlinuz-3.13.0-160-generic
 config-3.13.0-147-generic  System.map-3.13.0-116-generic  vmlinuz-3.13.0-48-generic

我尝试从这里删除最新的内核 - 似乎已部分安装:sudo apt-get purge linux-image-3.13.0-160

给了我这个:

读取包列表...完成
构建依赖关系树
读取状态信息...完成
注意,为正则表达式“linux-image-3.13.0-160”选择“linux-image-3.13.0-160-lowlatency”
注意,选择“ linux-image-3.13.0-160-generic' 用于正则表达式 'linux-image-3.13.0-160'
包 'linux-image-3.13.0-160-lowlatency' 未安装,因此未删除
您可能想要运行 'apt-get -f install' 来更正这些:
以下软件包具有未满足的依赖关系:
linux-headers-3.13.0-160-generic :取决于:linux-headers-3.13.0-160 但不会已安装
linux-image-virtual :取决于:linux-image-3.13.0-160-generic 但不会安装
E:未满足的依赖关系。尝试不带软件包的“apt-get -f install”(或指定解决方案)。

我真的很困惑该怎么做。如果有人能指出我正确的方向,那就太好了!我是否只使用 rm 删除 /boot 或 /usr/src 中的一些旧文件?因为大多数帖子建议不要这样做,而是使用 apt-get remove 等。命令干杯

apt 14.04 linux-headers
  • 2 个回答
  • 718 Views
Martin Hope
Masqueey
Asked: 2018-08-26 04:23:43 +0800 CST

Ubuntu 18.04 卡在升级 linux-header

  • 14

每当我尝试在 Ubuntu 18.04 中更新我的系统时,它就会停止: 卡住 只要它达到Setting up linux-headers-<version>-generic. 我无法从那里取消升级,但即使你离开它几个小时,它也不会改变任何东西。如果我检查它的过程,htop它会显示它现在正在做任何事情。如果我强制升级结束并尝试重新启动它,当我重试升级时,它说之前的升级已被中断,我应该尝试sudo dpkg --configure -a解决问题。

我只是觉得每次有可用的标头升级时都必须这样做非常烦人,特别是因为我觉得它不应该发生并且应该有更永久的修复可用。我错过了什么或做错了什么?

upgrade apt linux-headers 18.04
  • 3 个回答
  • 8515 Views
Martin Hope
Marc43
Asked: 2018-07-24 01:56:45 +0800 CST

在amd64架构机器上安装Python2.7和3个arm头

  • 2

我一直在苦苦挣扎,因为我想交叉编译一个需要 Python 编译的应用程序。以防万一您好奇,当它转到 pyconfig.h 时,它会尝试包含以下文件:

arm-linux-gnueabihf/python2.7/pyconfig.h

不幸的是,这不存在。然后,我想安装 python 头文件,所以我做了以下操作:

sudo dpkg --add-architecture armhf
sudo apt-get update

我得到以下输出,

Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial InRelease                
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]             
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease [107 kB]          
Hit:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease                      
Get:3 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]                       
Get:7 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [84.1 kB]     
Get:8 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf Packages [514 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [668 kB]  
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [587 kB]   
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]               
Ign:11 http://archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages           
Ign:12 http://archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages       
Get:13 http://ports.ubuntu.com/ubuntu-ports xenial-security/restricted armhf Packages [8480 B]
Get:14 http://ports.ubuntu.com/ubuntu-ports xenial-security/universe armhf Packages [375 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [12.7 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [455 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [385 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]              
Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]    
Ign:21 http://archive.ubuntu.com/ubuntu xenial/main armhf Packages                     
Get:22 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]     
Ign:23 http://archive.ubuntu.com/ubuntu xenial/restricted armhf Packages               
Get:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3738 B]
Ign:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Ign:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Ign:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Get:26 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Err:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages 
  404  Not Found [IP: 91.189.88.152 80]
Get:27 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages [9804 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Ign:29 http://archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:12 http://archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [261 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1046 kB]
Ign:32 http://archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Get:33 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Ign:34 http://archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Get:35 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [829 kB]
Ign:36 http://archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Get:37 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [18.8 kB]
Ign:38 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Ign:21 http://archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:23 http://archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:29 http://archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Ign:12 http://archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:32 http://archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:34 http://archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:36 http://archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:38 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Ign:21 http://archive.ubuntu.com/ubuntu xenial/main armhf Packages
Ign:23 http://archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:29 http://archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Err:11 http://archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
  404  Not Found [IP: 91.189.88.149 80]
Ign:12 http://archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:32 http://archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
Ign:34 http://archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:36 http://archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:38 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Err:21 http://archive.ubuntu.com/ubuntu xenial/main armhf Packages
  404  Not Found [IP: 91.189.88.149 80]
Ign:23 http://archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
Ign:29 http://archive.ubuntu.com/ubuntu xenial/multiverse armhf Packages
Err:32 http://archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
  404  Not Found [IP: 91.189.88.149 80]
Ign:34 http://archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Ign:36 http://archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:38 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Fetched 2452 kB in 2s (1020 kB/s)
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.149 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

我在互联网上搜索,很多人说解决方案是在 /etc/apt/sources.list 中区分哪些存储库用于 armhf 架构,哪些存储库用于 amd64、i386。这根本不起作用(我也不知道我做得好不好,我对sources.list不太了解),当我执行这个命令时:

sudo apt-get install libpython2.7-dev:armhf

我得到:

    The following packages have unmet dependencies:
 libpython2.7-dev:armhf : Depends: libpython2.7-stdlib:armhf (= 2.7.12-1ubuntu0~16.04.2) but it is not going to be installed
                          Depends: libpython2.7:armhf (= 2.7.12-1ubuntu0~16.04.2) but it is not going to be installed
                          Depends: libexpat1-dev:armhf but it is not going to be installed
                          Recommends: libc6-dev:armhf but it is not going to be installed or
                                      libc-dev:armhf
E: Unable to correct problems, you have held broken packages

你知道我在哪一步搞砸了吗?我不确定,我会感谢你的帮助,谢谢。

apt software-sources arm cross-compilation linux-headers
  • 2 个回答
  • 1826 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve