要创建helloworld .ipk
包,如here所述,我将bitbake
和OpenEmbedded
克隆为
git clone git://git.openembedded.org/bitbake
git clone git://git.openembedded.org/openembedded
然后导出以下varibales
export OEBASE=/media/sda3/open_env/
export PATH=$OEBASE/bitbak/ebin:$PATH
export BBPATH=$OEBASE/build:$OEBASE/openembedded
export BB_ENV_EXTRAWHITE="OEBASE"
当我运行以下命令时,我得到以下错误:
bitbake -b packages/myhelloworld/myhelloworld_0.1.bb
Traceback (most recent call last):
File "/usr/bin/bitbake", line 35, in <module>
import bb
ImportError: No module named bb
我在ubuntu 10.04
上这样做。我在这里缺少什么?
修改
如回答所示,我执行了以下命令并收到如下错误:
git clone git://git.openembedded.org/openembedded-core
cd openembedded-core
git clone git://git.openembedded.org/bitbake
cd ..
git checkout dylan
cd bitbake
git checkout 1.18
cd ..
. oe-init-build-env
修改build/conf/local.conf
并在myhelloworld
目录中创建openembedded-core/build/
目录,然后执行
bitbake myhelloworld/
我收到的错误是:
Traceback (most recent call last):
File "/media/sda3/open_env/openembedded-core/bitbake/bin/bitbake", line 34, in <module>
import bb
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py:104: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Error in sys.exitfunc:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Pseudo is not present but is required, building this first before the main build
Traceback (most recent call last):
File "/media/sda3/open_env/openembedded-core/bitbake/bin/bitbake", line 34, in <module>
import bb
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py:104: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Error in sys.exitfunc:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Traceback (most recent call last):
File "/media/sda3/open_env/openembedded-core/bitbake/bin/bitbake", line 34, in <module>
import bb
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py:104: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Error in sys.exitfunc:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
答案 0 :(得分:6)
你将最近的bitbake与OpenEmbedded classic混合在一起;请不要这样做。您还尝试手动设置构建环境,也避免使用它。任何新的开发都应该基于OpenEmbedded Core。
你应该做什么:
克隆存储库。
15,45
12,00
14,20
14,54
如果你想使用某个分支,例如jethro
git clone git://git.openembedded.org/openembedded-core
cd openembedded-core
git clone git://git.openembedded.org/bitbake
设置构建环境:
git checkout jethro
cd bitbake
git checkout 1.28
cd ..
配置构建。
即。在. oe-init-build-env
。
构建!
现在做你想要的,例如任何:
build/conf/local.conf
更新:请注意,正式针对bitbake core-image-minimal
bitbake myehelloworld
进行测试的Poky
的最新版本为Ubuntu 10.04
。以后的版本可能会在该主机上出现问题,我建议更新到更新的LTS版本。
更新2:您的新错误显示Dylan
。 Bitbake将首先查找ImportError: No module named pysqlite2
。在build-host sqlite3
答案 1 :(得分:-3)
您缺少bb模块。您需要从需求文件中安装所有依赖项,或者使用pip手动安装。 这可能对你有所帮助。 http://python-packaging-user-guide.readthedocs.org/en/latest/installing/#requirements-for-installing-packages