我已经安装了apt
通过添加 apt
到 BitBake 构建的系统上包到IMAGE_INSTALL
我的食谱中有变量。
apt-get
和apt-cache
现在在构建的系统上执行,但是如果我尝试对它们执行任何有用的操作(例如 apt-get update
或 apt-cache search
),我会收到以下错误:
E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
E: The package lists or status file could not be parsed or opened
经过一些初步搜索,我在 Yocto 项目邮件列表中找到了这个交换:
Hi,
I have some requirement with
apt-get
in yocto genearted rootfs.I built the yocto source code with enabling the
apt
package.But after booting the image on my machine and run the "
apt-get
" command for installing some package it gives the following error.
Could not open the file /var/lib/dpkg/status open(2: no such a file or directory).
The package lists or status files could not be parsed or opened.
这个错误是因为需要添加
package-management
至EXTRA_IMAGE_FEATURES
在local.conf
,block 引用>
PACKAGE_CLASSES ?= "package_deb"
EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"
我已添加
package-management
但没有看到任何不同的输出。在
touch /var/lib/dpkg/status
之后,apt-get update
返回以下内容:Reading package lists...Done
我怎样才能得到
apt
通过使用 BitBake 元数据进入正常运行状态?
最佳答案
我发现了类似的thread来自恩智浦网站。
您需要设置自己的 Web 服务器并提供所有这些包并将服务器 URL 添加到源列表中。 SourceList
此外,您必须通过运行 bitbake package-index
来更新软件包 list ,并将 PACKAGE_CLASSES ?= "package_deb"
添加到 conf/local.conf
我之前已经成功设置过 OPKG。步骤类似,可以找here
关于apt - 为什么 BitBake 生成的操作系统上缺少/var/lib/dpkg/status?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35510734/