编译内核时遇到“dpkg-gencontrol: error: package not in control info”的解决办法
2011-04-15 22:02
555 查看
在Ubuntu 10.10下编译Linux 2.6.35内核时,编译过程中止,并提示:
dpkg-gencontrol: error: package not in control info
国内论坛上没有搜到相关的任何信息,在国外的论坛上搜到了一些解决办法。这个问题是make-kpkg(属于kernel package)的一个bug,大致原因如下:
make-kpkg会在编译过程中会给linux kernel image的名字后面再追加一些后缀,在网看到有些后缀为“+”,有些为“-wl”,我这里的后缀为"-ice",不知道这个后缀是否跟版本有关。但是在源代码的debian/control文件中,kernel image的名字后面并没有追加这些后缀,两边不匹配,所以才会报错。
基于这个原因,修改办法也比较简单,修改debian/control文件即可,将里面所有的package和source name加上和编译过程中我们看到的后缀相同的字母即可。注意,由于每次编译内核时都会重新生成debian/control,因此该修改必须在编译开始后进行。
上述方法我自己没有验证,因为在另外的论坛中看到有人说kernel package最新的版本12.036已经解决了这个问题,那么为什么不更新至最新的kernel package呢? 手动在网站下载package更新的办法我暂时不会,用apt-get更新,可惜Ubuntu 10.10自带的源中还没有最新的package,最后功夫不负有心人,找到了另外的源,里面包含了最新的kernel package,在sources.list中添加如下即可:
deb http://ppa.launchpad.net/brian-rogers/ppa/ubuntu
maverick
main
deb-src http://ppa.launchpad.net/brian-rogers/ppa/ubuntu
maverick
main
详情可以参考https://launchpad.net/~brian-rogers/+archive/ppa
添加后,运行如下命令:
sudo apt-get update
sudo apt-get install kernel-package
提示后更新即可,这样再重新编译kernel,便没有了上面的问题,另外查看debian/control文件,发现名字后面已经默认添加了所需要的后缀。
dpkg-gencontrol: error: package not in control info
国内论坛上没有搜到相关的任何信息,在国外的论坛上搜到了一些解决办法。这个问题是make-kpkg(属于kernel package)的一个bug,大致原因如下:
make-kpkg会在编译过程中会给linux kernel image的名字后面再追加一些后缀,在网看到有些后缀为“+”,有些为“-wl”,我这里的后缀为"-ice",不知道这个后缀是否跟版本有关。但是在源代码的debian/control文件中,kernel image的名字后面并没有追加这些后缀,两边不匹配,所以才会报错。
基于这个原因,修改办法也比较简单,修改debian/control文件即可,将里面所有的package和source name加上和编译过程中我们看到的后缀相同的字母即可。注意,由于每次编译内核时都会重新生成debian/control,因此该修改必须在编译开始后进行。
上述方法我自己没有验证,因为在另外的论坛中看到有人说kernel package最新的版本12.036已经解决了这个问题,那么为什么不更新至最新的kernel package呢? 手动在网站下载package更新的办法我暂时不会,用apt-get更新,可惜Ubuntu 10.10自带的源中还没有最新的package,最后功夫不负有心人,找到了另外的源,里面包含了最新的kernel package,在sources.list中添加如下即可:
deb http://ppa.launchpad.net/brian-rogers/ppa/ubuntu
maverick
main
deb-src http://ppa.launchpad.net/brian-rogers/ppa/ubuntu
maverick
main
详情可以参考https://launchpad.net/~brian-rogers/+archive/ppa
添加后,运行如下命令:
sudo apt-get update
sudo apt-get install kernel-package
提示后更新即可,这样再重新编译kernel,便没有了上面的问题,另外查看debian/control文件,发现名字后面已经默认添加了所需要的后缀。
相关文章推荐
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
- [Centos] mod_wsgi 安装流程以及遇到问题解决办法。apxs: command not found 或 Sorry, Python developer package does not appear to be installed.
- bak 5. 编译libmad 出现error impossible constraint in “asm”时的解决办法.
- php编译中遇到种种error解决办法
- ADS编译错误Error: Fatal L6002U:Could not open file:.....解决办法
- 解决编译libiconv时报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- Icon specified in the Info.plist not found under the top level app wrapper:解决办法
- error: 'EOF' was not declared in this scope的解决办法
- Intellij编译时报“java: System Java Compiler was not found in classpath” 解决办法
- 解决Android studio编译时遇到AAPT err(Facade for): libpng error: Not a PNG file 错误
- Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ordinal not in range(128)”问题解决办法
- python UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2: ordinal not in range(128)错误解决办法
- AS打包apk及常见错误解决办法Error:(4) Error: "ssdk_instapager_login_html" is not translated in "en" (English)
- linux 内核编译时出现scripts/sign-file.c:23:30: fatal error: openssl/opensslv.h错误的解决办法
- linux 内核编译时出现scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h错误的解决办法
- 在使用AndroidStudio打包apk时,遇到“xxx is not translated in xxx”错误的解决办法
- 编译cocos2dx遇到error:undefine reference to'dladdr'的解决办法
- AS打包apk及常见错误解决办法Error:(4) Error: "ssdk_instapager_login_html" is not translated in "en" (English)
- 编译php的时候,报configure: error: mcrypt.h not found. Please reinstall libmcrypt.错误的解决办法
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法