I have a Raspberry 4 model B and was trying to build Yocoto linux from Ubuntu for installation. I was following https://medium.com/#shantanoodesai/run-docker-on-a-raspberry-pi-4-with-yocto-project-551d6b615c0b instructions. At step
bitbake-layers add-layer ../layers/meta-openembedded/meta-python
bitbake-layers add-layer ../layers/meta-raspberrypi
I encountered the following errors
pi#raspberrypi:~/Yocto/RaspberryPi/build $ bitbake-layers add-layer ../layers/meta-openembedded/meta-python
NOTE: Starting bitbake server...
Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 93, in <module>
ret = main()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 61, in main
tinfoil.prepare(True)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 408, in prepare
self.run_command('parseConfiguration')
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 466, in run_command
raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 74, in runCommand
result = command_method(self, commandline)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 275, in parseConfiguration
command.cooker.parseConfiguration()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 427, in parseConfiguration
self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 1225, in handleCollections
raise CollectionError("Errors during parsing layer configuration")
bb.cooker.CollectionError: Errors during parsing layer configuration
pi#raspberrypi:~/Yocto/RaspberryPi/build $ bitbake-layers add-layer ../layers/meta-raspberrypi
NOTE: Starting bitbake server...
Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 93, in <module>
ret = main()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/bin/bitbake-layers", line 61, in main
tinfoil.prepare(True)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 408, in prepare
self.run_command('parseConfiguration')
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/tinfoil.py", line 466, in run_command
raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 74, in runCommand
result = command_method(self, commandline)
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/command.py", line 275, in parseConfiguration
command.cooker.parseConfiguration()
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 427, in parseConfiguration
self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
File "/home/pi/Yocto/RaspberryPi/layers/poky/bitbake/lib/bb/cooker.py", line 1225, in handleCollections
raise CollectionError("Errors during parsing layer configuration")
bb.cooker.CollectionError: Errors during parsing layer configuration
Can anyone advise what should be fixed?
my gcc-multilib install also failed
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm python
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'git' instead of 'git-core'
Package gcc-multilib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-multilib' has no installation candidate
I think there is an issue with bitbake-layers tool in warrior release here, so an alternative is to try to open conf/bblayers.conf file in an editor and delete the last entry/line ( probably one containing meta-networking ) in BBLAYERS variable and save the file. Now continue with the bitbake-layers add-layer
bitbake-layers add-layer ../layers/meta-openembedded/meta-networking
bitbake-layers add-layer ../layers/meta-openembedded/meta-python
bitbake-layers add-layer ../layers/meta-raspberrypi
Hope this helps
i got same error and solved with below methods
all layers should be on same branch. like meta-raspberripi , meta-openembedded , meta-poky should be on same zeus branch.
we can check we are on which branch by git branch.
we can mover to branch by git checkout zeus.
if you already got error their then open bblayers.conf and delete last added layers before adding new layers again (as suggested above).
Related
How do I install psycopg2-binary in Operator Framework Ansible? I've tried adding a RUN pip3 install psycopg2-binary to the Dockerfile but that returns:
Installing collected packages: psycopg2-binary
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 365, in run
strip_file_prefix=options.strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 789, in install
**kwargs
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 854, in install
strip_file_prefix=strip_file_prefix
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 1069, in move_wheel_files
strip_file_prefix=strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib64/python3.6/site-packages/psycopg2'
PS. I couldn't add Operator-Framework tag because I need 130 more points to be able to ;)
I've found the origin of the Dockerfile and that helped me come up with this:
COPY requirements.txt ${HOME}/requirements.txt
USER root
RUN pip3 install -r ${HOME}/requirements.txt
USER ${USER_UID}
I'm making a simple apk using buildozer in kivy.
I tried re-installing two times android sdk ndk, but sdkmanager tools are not automatically installed.
# Apache ANT found at /home/shivam/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/shivam/.buildozer/android/platform/android-sdk
# Android NDK found at /home/shivam/.buildozer/android/platform/android-ndk-r17c
# Read available permissions from api-versions.xml
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=firstapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/shivam/.buildozer/android/platform/build" --ndk-api=21'
# Cwd /home/shivam/.buildozer/android/platform/python-for-android
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1073, in
main()
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1067, in main
ToolchainCL()
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 576, in
__init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/shivam/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 144, in
wrapper_func
user_ndk_api=self.ndk_api)
File "pythonforandroid/build.py", line 236, in prepare_build_environment
avdmanager = sh.Command(join(sdk_dir, 'tools', 'bin', 'avdmanager'))
File "/home/shivam/.local/lib/python2.7/site-packages/sh.py", line 1202, in __init__
raise CommandNotFound(path)
sh.CommandNotFound: /home/shivam/.buildozer/android/platform/android-sdk/tools/bin/avdmanager
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=firstapp --bootstrap=sdl2 –
requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-
dir="/home/shivam/.buildozer/android/platform/build" --ndk-api=21
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
I am not able to use anymore the pip install command to install from a github branch. I was using this line of code for the last 2 years but suddenly it stoped working:
/home/training/bin/pip install git+https://github.com/org/project#my_branch
My git version is 1.7.10 and my operating system is Red Hat Enterprise Linux Server release 6.4
The error I get is:
Cloning https://github.com/wfp-ose/django-geoexplorer.git (to wfp_migration_training) to /tmp/pip-jDnC_j-build
error: while accessing https://github.com/wfp-ose/django-geoexplorer.git/info/refs
fatal: HTTP request failed
Complete output from command /usr/bin/git clone -q https://github.com/wfp-ose/django-geoexplorer.git /tmp/pip-jDnC_j-build:
When I check in the pip log I get:
Command /usr/bin/git clone -q https://github.com/wfp-ose/django-
geoexplorer.git /tmp/pip-jDnC_j-build failed with error code 128 in None
Exception information:
Traceback (most recent call last):
File "/home/training/lib/python2.7/site-packages/pip/basecommand.py", line
122, in main
status = self.run(options, args)
File "/home/training/lib/python2.7/site-packages/pip/commands/install.py",
line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle,
bundle=self.bundle)
File "/home/training/lib/python2.7/site-packages/pip/req.py", line 1197, in
prepare_files
do_download,
File "/home/training/lib/python2.7/site-packages/pip/req.py", line 1360, in
unpack_url
unpack_vcs_link(link, loc, only_download)
File "/home/training/lib/python2.7/site-packages/pip/download.py", line 344,
in unpack_vcs_link
vcs_backend.unpack(location)
File "/home/training/lib/python2.7/site-packages/pip/vcs/__init__.py", line
240, in unpack
self.obtain(location)
File "/home/training/lib/python2.7/site-packages/pip/vcs/git.py", line 111,
in obtain
call_subprocess([self.cmd, 'clone', '-q', url, dest])
File "/home/training/lib/python2.7/site-packages/pip/util.py", line 697, in
call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/git clone -q https://github.com/wfp-
ose/django-geoexplorer.git /tmp/pip-jDnC_j-build failed with error code 128
in
None
I haven't changed anything in my .config file for git and I am logged in properly in my github account.
EDIT
I think this is related to this:
https://githubengineering.com/crypto-removal-notice/
See the text at https://github.com/wfp-ose/django-geoexplorer.git/info/refs:
Please upgrade your git client.
GitHub.com no longer supports git over dumb-http
Just installed Yocto. On a morty branch. Executed the following commands:
cd poky
source oe-init-build-env build-qemuarm
In conf/local.conf changed the name of the machine to MACHINE ?= "qemuarm"
Then executed the following:
$ bitbake core-image-minimal
Loading cache: 100% |##########################################################################################################| Time: 0:00:00
Loaded 1320 entries from dependency cache.
ERROR: Execution of event handler 'sstate_eventhandler2' failed
Traceback (most recent call last):
File "/home/some-user/projects/melp/poky/meta/classes/sstate.bbclass", line 1015, in sstate_eventhandler2(e=<bb.event.ReachableStamps object at 0x7fbc17f2e0f0>):
for l in lines:
> (stamp, manifest, workdir) = l.split()
if stamp not in stamps:
ValueError: not enough values to unpack (expected 3, got 1)
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/command.py", line 101, in runAsyncCommand
self.cooker.updateCache()
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/cooker.py", line 1658, in updateCache
bb.event.fire(event, self.databuilder.mcdata[mc])
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 201, in fire
fire_class_handlers(event, d)
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 124, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 96, in execute_handler
ret = handler(event)
File "/home/some-user/projects/melp/poky/meta/classes/sstate.bbclass", line 1015, in sstate_eventhandler2
(stamp, manifest, workdir) = l.split()
ValueError: not enough values to unpack (expected 3, got 1)
It looks like it is a python error. Does anyone know what is the issue? Am I using the wrong version?
Here is the output of python --version
$ python --version
Python 2.7.12
What am I doing wrong?
You realise that Morty is 18 months old and in a few weeks will be longer supported right?
Anyway, looks like the sstate-cache/ somehow is corrupted. Delete your tmp/ and sstate-cache/ directories and try again.
I have a Dockerfile that builds an image based on CentOS (tag: centos6):
FROM centos
RUN rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RUN yum update -y
RUN yum install ansible -y
ADD ./ansible /home/root/ansible
RUN cd /home/root/ansible;ansible-playbook -v -i hosts site.yml
Everything works fine until Docker hits the last line, then I get the following errors:
[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (ie. yum update gmp).
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 317, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 257, in main
pb.run()
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 319, in run
if not self._run_play(play):
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 620, in _run_play
self._do_setup_step(play)
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 565, in _do_setup_step
accelerate_port=play.accelerate_port,
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 204, in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Stderr from the command:
package epel-release-6-8.noarch is already installed
I imagine that the cause of the error is the gmp package not being up to date.
There is a related issue on GitHub: https://github.com/ansible/ansible/issues/6941
But there doesn't seem to be any solutions at the moment ...
Any ideas ?
Thanks in advance !
My site.yml playbook:
- hosts: all
pre_tasks:
- shell: echo 'hello'
Make sure that the files site.yml and hosts are present in the directory you're adding to /home/root/ansible.
Side note, you can simplify your Dockerfile by using WORKDIR:
WORKDIR /home/root/ansible
RUN ansible-playbook -v -i hosts site.yml