Linux Error during make gobject-introspection-1.32.1 - linux

I want to install gobject-introspection-1.32.1 on my embedded Linux.
But during make this error message appear.
Do anybody now what to do?
-bash-3.2# make
[ -d gir ] || /bin/mkdir -p gir ; \
sed \
-e s,%CAIRO_SHARED_LIBRARY%,, \
-e s,%CAIRO_GIR_PACKAGE%,, \
< gir/cairo-1.0.gir.in > gir/cairo-1.0.gir.tmp && mv gir/cairo-1.0.gir.tmp gir/cairo-1.0.gir
make all-recursive
make[1]: Entering directory `/root/gobject-introspection-1.32.1'
Making all in .
make[2]: Entering directory `/root/gobject-introspection-1.32.1'
GEN g-ir-scanner
GEN g-ir-annotation-tool
GISCAN GLib-2.0.gir
Traceback (most recent call last):
File "./g-ir-scanner", line 44, in <module>
from giscanner.scannermain import scanner_main
File "./giscanner/scannermain.py", line 29, in <module>
import tempfile
File "/usr/local/lib/python2.7/tempfile.py", line 34, in <module>
from random import Random as _Random
File "/usr/local/lib/python2.7/random.py", line 881, in <module>
_inst = Random()
File "/usr/local/lib/python2.7/random.py", line 97, in __init__
self.seed(x)
File "/usr/local/lib/python2.7/random.py", line 111, in seed
a = long(_hexlify(_urandom(16)), 16)
RuntimeError: Failed to read %zi bytes from /dev/urandom
make[2]: *** [GLib-2.0.gir] Error 1
make[2]: Leaving directory `/root/gobject-introspection-1.32.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/gobject-introspection-1.32.1'
make: *** [all] Error 2

Related

Ansible Zypper module error when I try to update packages

Good day all!
I have written a very simple Ansible Role to update all packages to Suse Leap 15.2:
- name: All packages updated
package:
name: "*"
state: latest
but it seems that the Zypper module has a problem with it:
TASK [system_update : All packages updated] ***************************************************************************************************************************************************************************************************
task path: /home/merlin/ansible-kt-linux/roles/system_update/tasks/main.yml:10
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: merlin
<localhost> EXEC /bin/sh -c 'echo ~merlin && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811 `" && echo ansible-tmp-1617094154.778992-48329012899811="` echo /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811 `" ) && sleep 0'
Using module file /usr/lib/python3.6/site-packages/ansible/modules/packaging/os/zypper.py
<localhost> PUT /home/merlin/.ansible/tmp/ansible-local-5239dx5tukgw/tmpvf5upp37 TO /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/ /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py && sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-qfmrjmpwqhyapufsdqunaohtmlxjucdk ; /usr/bin/python /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py'"'"' && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py", line 102, in <module>
_ansiballz_main()
File "/home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.packaging.os.zypper', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python2.7/runpy.py", line 188, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_zypper_payload_jYlnfB/ansible_zypper_payload.zip/ansible/modules/packaging/os/zypper.py", line 195, in <module>
ImportError: No module named xml
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/merlin/.ansible/tmp/ansible-tmp-1617094154.778992-48329012899811/AnsiballZ_zypper.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.packaging.os.zypper', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 188, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_zypper_payload_jYlnfB/ansible_zypper_payload.zip/ansible/modules/packaging/os/zypper.py\", line 195, in <module>\nImportError: No module named xml\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP ************************************************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
unfortunately I can't read from this what exactly the problem is. Do any of you know the problem?
solved it with shell:
- name: "Install python-xml on Suse"
shell: zypper -n install python-xml

Permission denied while test BERT example from Google cloud shell

Traceback (most recent call last):
File "./bert/run_classifier.py", line 981, in <module>
tf.app.run()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.5/dist-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/usr/local/lib/python3.5/dist-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "./bert/run_classifier.py", line 808, in main
tf.gfile.MakeDirs(FLAGS.output_dir)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 438, in recursive_create_dir
recursive_create_dir_v2(dirname)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 453, in recursive_create_dir_v2
pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(path))
tensorflow.python.framework.errors_impl.PermissionDeniedError: /MRPC-output; Permission denied
I am following the BERT example on the Google Cloud platform. (https://cloud.google.com/tpu/docs/tutorials/bert?hi)
In the last process, after input the next code, I got an error that permission denied.
python3 ./bert/run_classifier.py \
--task_name=${TASK_NAME} \
--do_train=true \
--do_eval=true \
--data_dir=$GLUE_DIR/${TASK_NAME} \
--vocab_file=$BERT_BASE_DIR/vocab.txt \
--bert_config_file=$BERT_BASE_DIR/bert_config.json \
--init_checkpoint=$BERT_BASE_DIR/bert_model.ckpt \
--max_seq_length=128 \
--train_batch_size=32 \
--learning_rate=2e-5 \
--num_train_epochs=3.0 \
--output_dir=${STORAGE_BUCKET}/${TASK_NAME}-output/ \
--use_tpu=True \
--tpu_name=$TPU_NAME
what should I do?
Thanks for your answer in advance.

I am getting the errors when i am running the command the qtl seq downloaded by conda. I am running following command

[QTL-seq:2019-10-09 09:13:37] !!ERROR!! bcftools concat -a -O z -o Chikpea_qtl/30_vcf/qtlseq.vcf.gz Chikpea_qtl/30_vcf/qtlseq.*.vcf.gz >> Chikpea_qtl/log/bcftools.log 2>&1
Failed to open Chikpea_qtl/30_vcf/qtlseq.NW_004516646.1.vcf.gz: could not load index
Traceback (most recent call last):
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/mpileup.py", line 191, in concat
check=True)
File "/home/jthakur/anaconda2/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'bcftools concat -a -O z -o Chikpea_qtl/30_vcf/qtlseq.vcf.gz Chikpea_qtl/30_vcf/qtlseq.*.vcf.gz >> Chikpea_qtl/log/bcftools.log 2>&1' returned non-zero exit status 255.
Traceback (most recent call last):
File "/home/jthakur/anaconda2/bin/qtlseq", line 11, in
load_entry_point('qtlseq', 'console_scripts', 'qtlseq')()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/qtlseq.py", line 192, in main
QTLseq(args).run()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/qtlseq.py", line 123, in mpileup
mp.run()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/mpileup.py", line 232, in run
self.concat()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/mpileup.py", line 194, in concat
sys.exit()
NameError: name 'sys' is not defined

MLflow Error while deploying the Model to local REST server

System Details:
Operating System: Ubuntu 19.04
Anaconda version: 2019.03
Python version: 3.7.3
mlflow version: 1.0.0
Steps to Reproduce: https://mlflow.org/docs/latest/tutorial.html
Error at line/command: mlflow models serve -m [path_to_model] -p 1234
Error:
Command 'source activate mlflow-c4536834c2e6e0e2472b58bfb28dce35b4bd0be6 1>&2 && gunicorn --timeout 60 -b 127.0.0.1:1234 -w 4 mlflow.pyfunc.scoring_server.wsgi:app' returned non zero return code. Return code = 1
Terminal Log:
(mlflow) root#user:/home/user/mlflow/mlflow/examples/sklearn_elasticnet_wine/mlruns/0/e3dd02d5d84545ffab858db13ede7366/artifacts/model# mlflow models serve -m $(pwd) -p 1234
2019/06/18 16:15:16 INFO mlflow.models.cli: Selected backend for flavor 'python_function'
2019/06/18 16:15:17 INFO mlflow.pyfunc.backend: === Running command 'source activate mlflow-c4536834c2e6e0e2472b58bfb28dce35b4bd0be6 1>&2 && gunicorn --timeout 60 -b 127.0.0.1:1234 -w 4 mlflow.pyfunc.scoring_server.wsgi:app'
bash: activate: No such file or directory
Traceback (most recent call last):
File "/root/anaconda3/envs/mlflow/bin/mlflow", line 10, in <module>
sys.exit(cli())
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/mlflow/models/cli.py", line 43, in serve
host=host)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/mlflow/pyfunc/backend.py", line 76, in serve
command_env=command_env)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/mlflow/pyfunc/backend.py", line 147, in _execute_in_conda_env
command, rc
Exception: Command 'source activate mlflow-c4536834c2e6e0e2472b58bfb28dce35b4bd0be6 1>&2 && gunicorn --timeout 60 -b 127.0.0.1:1234 -w 4 mlflow.pyfunc.scoring_server.wsgi:app' returned non zero return code. Return code = 1
(mlflow) root#user:/home/user/mlflow/mlflow/examples/sklearn_elasticnet_wine/mlruns/0/e3dd02d5d84545ffab858db13ede7366/artifacts/model#
Following the steps mentioned in the GitHub Issue 1507 (https://github.com/mlflow/mlflow/issues/1507) I was able to resolve this issue.
In reference to this post, the "anaconda/bin/" directory is never added to the list of environment variables i.e. PATH variable. In order to resolve this issue, add the "else" part of conda initialize code block from ~/.bashrc file to your PATH variable.
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/atulk/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/atulk/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/atulk/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/atulk/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
In this case, I added export PATH="/home/atulk/anaconda3/bin:$PATH" to the PATH variable. However, this is just a temporary fix until the issue is fixed in the project.
export PATH=$PATH:/path/to/python/Python/2.7/bin
can be used when you are not using anaconda

sudo -H -u git gitosis-init < ~/id_rsa.pub | error: no such file or directory

I got this shell script from a blog about how to equip git with gitosis.
But i got a "No such file or directory" error after running the script.
[git#209285 ~]$ sudo -H -u git gitosis-init < ~/id_rsa.pub
Traceback (most recent call last):
File "/usr/local/bin/gitosis-init", line 9, in <module>
load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 24, in run
return app.main()
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 38, in main
self.handle_args(parser, cfg, options, args)
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 138, in handle_args
user=user,
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 75, in init_admin_repository
template=resource_filename('gitosis.templates', 'admin')
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/repository.py", line 63, in init
close_fds=True,
File "/usr/local/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/local/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I am puzzled,as the man manual says that:
-H The -H (HOME) option sets the HOME environment variable to the homedir of the target user (root by default) as specified in passwd(5). By default, sudo
does not modify HOME (see set_home and always_set_home in sudoers(5)).
,which is cited from linux manual.
The -H option just sets the HOME environment variable to the homedir of the target user as specified in passwd.
However i specified "/home/git" as homedir for git user in my /etc/passwd file.
apache:x:48:48:Apache:/var/www:/sbin/nologin
git:x:100:101:git version control:/home/git:/bin/bash
duanduan:x:101:500::/home/duanduan:/bin/bash
But why i still got this message? or was incorrect my comprehension of the description in manual?
Append for comments:
And it seems like before with specifying a absolute path.Maybe, it's not the cause.
sudo -H -u git gitosis-init < /home/git/id_rsa.pub
Traceback (most recent call last):
File "/usr/local/bin/gitosis-init", line 9, in <module>
load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 24, in run
return app.main()
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 38, in main
self.handle_args(parser, cfg, options, args)
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 138, in handle_args
user=user,
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 75, in init_admin_repository
template=resource_filename('gitosis.templates', 'admin')
File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/repository.py", line 63, in init
close_fds=True,
File "/usr/local/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/local/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I guess it is because ~ is expanded by bash before transferring to sudo as a argument, why not try to specify a absolute path for you public key file?

Resources