Cannot build apktool on Ubuntu 14.04 - ubuntu-14.04

I'm trying to build apktool (tool for decompiling android apk files).
The instructions how to build are at http://ibotpeaches.github.io/Apktool/build/
The problem is with the command ./gradlew build fatJar
The errors that I receive are:
brut.androlib.SharedLibraryTest > isSharedResourceDecodingAndRebuildingWorking FAILED
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -F, /tmp/APKTOOL134713816630716118.tmp, -0, arsc, -I, /tmp/BRUT4423679278565619004.tmp/1.apk, -I, /tmp/BRUT4423679278565619004.tmp/2-shared.apk, -S, /tmp/BRUT4423679278565619004.tmp/client.apk.out/res, -M, /tmp/BRUT4423679278565619004.tmp/client.apk.out/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
at brut.androlib.Androlib.buildResources(Androlib.java:397)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.SharedLibraryTest.isSharedResourceDecodingAndRebuildingWorking(SharedLibraryTest.java:102)
Caused by:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -F, /tmp/APKTOOL134713816630716118.tmp, -0, arsc, -I, /tmp/BRUT4423679278565619004.tmp/1.apk, -I, /tmp/BRUT4423679278565619004.tmp/2-shared.apk, -S, /tmp/BRUT4423679278565619004.tmp/client.apk.out/res, -M, /tmp/BRUT4423679278565619004.tmp/client.apk.out/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
... 3 more
Caused by:
brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -F, /tmp/APKTOOL134713816630716118.tmp, -0, arsc, -I, /tmp/BRUT4423679278565619004.tmp/1.apk, -I, /tmp/BRUT4423679278565619004.tmp/2-shared.apk, -S, /tmp/BRUT4423679278565619004.tmp/client.apk.out/res, -M, /tmp/BRUT4423679278565619004.tmp/client.apk.out/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 4 more
Caused by:
java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:84)
... 5 more
Caused by:
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 8 more
brut.androlib.ProviderAttributeTest > isProviderStringReplacementWorking FAILED
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL5763864884088802643.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/res, -M, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
at brut.androlib.Androlib.buildResources(Androlib.java:397)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.ProviderAttributeTest.isProviderStringReplacementWorking(ProviderAttributeTest.java:59)
Caused by:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL5763864884088802643.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/res, -M, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
... 3 more
Caused by:
brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL5763864884088802643.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/res, -M, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 4 more
Caused by:
java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:84)
... 5 more
Caused by:
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 8 more
brut.androlib.BuildAndDecodeJarTest > classMethod FAILED
brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, -F, /tmp/BRUT3478421848789513632.tmp/testjar.jar, -0, arsc, /tmp/BRUT3478421848789513632.tmp/testjar-orig/build/apk]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildApk(Androlib.java:661)
at brut.androlib.Androlib.build(Androlib.java:290)
at brut.androlib.BuildAndDecodeJarTest.beforeClass(BuildAndDecodeJarTest.java:45)
Caused by:
brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, -F, /tmp/BRUT3478421848789513632.tmp/testjar.jar, -0, arsc, /tmp/BRUT3478421848789513632.tmp/testjar-orig/build/apk]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 3 more
Caused by:
java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:84)
... 4 more
Caused by:
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 7 more
brut.androlib.BuildAndDecodeTest > classMethod FAILED
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL4080305473457824664.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT8741597800933526375.tmp/testapp-orig/res, -M, /tmp/BRUT8741597800933526375.tmp/testapp-orig/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
at brut.androlib.Androlib.buildResources(Androlib.java:397)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.BuildAndDecodeTest.beforeClass(BuildAndDecodeTest.java:47)
Caused by:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL4080305473457824664.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT8741597800933526375.tmp/testapp-orig/res, -M, /tmp/BRUT8741597800933526375.tmp/testapp-orig/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
... 3 more
Caused by:
brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL4080305473457824664.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT8741597800933526375.tmp/testapp-orig/res, -M, /tmp/BRUT8741597800933526375.tmp/testapp-orig/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 4 more
Caused by:
java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:485)
at brut.util.OS.exec(OS.java:84)
... 5 more
Caused by:
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 8 more
6 tests completed, 4 failed
:brut.apktool:apktool-lib:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':brut.apktool:apktool-lib:test'.
> There were failing tests. See the report at: file:///home/ran/Apktool/brut.apktool/apktool-lib/build/reports/tests/index.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I tried it several times, but received the same errors.
What can I do to fix it?
(Somehow in Ubuntu 12.04 it works, but not on Ubuntu 14.04).
EDIT
The jar file ./brut.apktool/apktool-cli/build/libs/apktool-cli.jar was created, but the errors remain.

I found the problem: aapt was missing...,
To add aapt, I had to install Android SDK, then run Android SDK Manager (./android in android-sdk-linux/tools), and install Android SDK Platform-tools.
aapt is in android-sdk-linux/built-tools/22.0.1 directory.
I also had to install lib32z1 (with sudo apt-get install) and add the aapt directory to PATH env variable in order to make aapt working.

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

How to solve "Operation not permitted: '/var/lib/pgadmin'" error in laradock at Windows Subsystem for Linux?

I am using the Laradock in my Laravel project for dockerizing with Nginx, Postgres, and Pgadmin. All the containers are running well but the Pgadmin is unable to do so. Here is my error log,
pgadmin_1 | WARNING: Failed to set ACL on the directory containing the configuration database: [Errno 1] Operation not permitted: '/var/lib/pgadmin'
pgadmin_1 | Traceback (most recent call last):
pgadmin_1 | File "run_pgadmin.py", line 4, in <module>
pgadmin_1 | from pgAdmin4 import app
pgadmin_1 | File "/pgadmin4/pgAdmin4.py", line 92, in <module>
pgadmin_1 | app = create_app()
pgadmin_1 | File "/pgadmin4/pgadmin/__init__.py", line 241, in create_app
pgadmin_1 | create_app_data_directory(config)
pgadmin_1 | File "/pgadmin4/pgadmin/setup/data_directory.py", line 40, in create_app_data_directory
pgadmin_1 | _create_directory_if_not_exists(config.SESSION_DB_PATH)
pgadmin_1 | File "/pgadmin4/pgadmin/setup/data_directory.py", line 16, in _create_directory_if_not_exists
pgadmin_1 | os.mkdir(_path)
pgadmin_1 | PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin/sessions'
pgadmin_1 | sudo: setrlimit(RLIMIT_CORE): Operation not permitted
pgadmin_1 | [2020-06-07 11:48:43 +0000] [1] [INFO] Starting gunicorn 19.9.0
pgadmin_1 | [2020-06-07 11:48:43 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
pgadmin_1 | [2020-06-07 11:48:43 +0000] [1] [INFO] Using worker: threads
pgadmin_1 | /usr/local/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
pgadmin_1 | return io.open(fd, *args, **kwargs)
pgadmin_1 | [2020-06-07 11:48:43 +0000] [83] [INFO] Booting worker with pid: 83
pgadmin_1 | [2020-06-07 11:48:44 +0000] [83] [ERROR] Exception in worker process
pgadmin_1 | Traceback (most recent call last):
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
pgadmin_1 | worker.init_process()
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 104, in init_process
pgadmin_1 | super(ThreadWorker, self).init_process()
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
pgadmin_1 | self.load_wsgi()
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
pgadmin_1 | self.wsgi = self.app.wsgi()
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
pgadmin_1 | self.callable = self.load()
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
pgadmin_1 | return self.load_wsgiapp()
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
pgadmin_1 | return util.import_app(self.app_uri)
pgadmin_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
pgadmin_1 | __import__(module)
pgadmin_1 | File "/pgadmin4/run_pgadmin.py", line 4, in <module>
pgadmin_1 | from pgAdmin4 import app
pgadmin_1 | File "/pgadmin4/pgAdmin4.py", line 92, in <module>
pgadmin_1 | app = create_app()
pgadmin_1 | File "/pgadmin4/pgadmin/__init__.py", line 241, in create_app
pgadmin_1 | create_app_data_directory(config)
pgadmin_1 | File "/pgadmin4/pgadmin/setup/data_directory.py", line 40, in create_app_data_directory
pgadmin_1 | _create_directory_if_not_exists(config.SESSION_DB_PATH)
pgadmin_1 | File "/pgadmin4/pgadmin/setup/data_directory.py", line 16, in _create_directory_if_not_exists
pgadmin_1 | os.mkdir(_path)
pgadmin_1 | PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin/sessions'
pgadmin_1 | [2020-06-07 11:48:44 +0000] [83] [INFO] Worker exiting (pid: 83)
pgadmin_1 | WARNING: Failed to set ACL on the directory containing the configuration database: [Errno 1] Operation not permitted: '/var/lib/pgadmin'
pgadmin_1 | /usr/local/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
pgadmin_1 | return io.open(fd, *args, **kwargs)
pgadmin_1 | [2020-06-07 11:48:44 +0000] [1] [INFO] Shutting down: Master
pgadmin_1 | [2020-06-07 11:48:44 +0000] [1] [INFO] Reason: Worker failed to boot.
I have tried many ways to solve this problem. Such as,
OSError: [Errno 13] Permission denied: '/var/lib/pgadmin'
https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
and some other github issues and their solutions. I also run the sudo chmod -R 777 ~/.laradock/data/pgadmin and sudo chmod -R 777 /var/lib/pgadmin command to get the permission but still the same error log. Can you guys help me on this? I think some others are also getting this error on their local machine.
Thanks 🙂
You may try this:
sudo chown -R 5050:5050 ~/.laradock/data/pgadmin
Then restart the container. Cause in the container with:
uid=5050(pgadmin) gid=5050(pgadmin)
and
drwx------ 4 pgadmin pgadmin 56 Jan 27 08:25 pgadmin
As others have noted above, I found that Permission denied: '/var/lib/pgadmin/sessions' in Docker speaks to the challenge on the persistent local folder not having the correct user permissions.
After running sudo chown -R 5050:5050 ~/.laradock/data/pgadmin and restarting the container, the below error is no longer in my log
PermissionError: [Errno 13] Permission denied:
A similar error happens when using Kubernetes and the pgadmin4 helm chart from https://github.com/rowanruseler/helm-charts.
The solution is to set:
VolumePermissions:
enabled: true
even when persistence is not enabled. In this way also the /var/lib/pgadmin folder in the container gets assigned of the correct permissions and the pgadmin4.db database can be created correctly.
Assuming you have folder with pgadmin4.db already defined on your git repo with an other user than pgadmin, you can do so:
postgres_interface:
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=user#domain.com
- PGADMIN_DEFAULT_PASSWORD=postgres
ports:
- "5050:80"
user: root
volumes:
- ./env/local/pgadmin/pgadmin4.db:/pgadmin4.db
entrypoint: /bin/sh -c "cp /pgadmin4.db /var/lib/pgadmin/pgadmin4.db && cd /pgadmin4 && /entrypoint.sh"
The only solution I can provide is to log in to the container with
docker-compose exec --user root pgadmin sh
and then
chmod 0777 /var/lib/pgadmin -R
probably it may be better to create your own dockerfile from dpage/pgadmin4 and run these commands 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

Error Installing Python Libraries through Nexus Repo Manager

I am currently trying to install two libraries.
Running: C:\Users\J39304\Desktop>python -m pip install pyinstaller yields me the following error:
> C:\Users\jerry\Desktop>python -m pip install pyinstaller
> Looking in indexes: https://repo-manager-location-proprietarysimple
> Collecting pyinstaller
>
>
> Using cached https://repo-manager-location-proprietarypackages/03/32/hash/PyInstaller-3.4.tar.gz
>
>
> Installing build dependencies ... error
> ERROR: Complete output from command 'C:\Python35-32\python.exe' 'C:\Python35-32\lib\site-packages\pip' install --ignore-installed
> --no-user --prefix 'C:\Users\jerry\AppData\Local\Temp\pip-build-env-a6x0i3h0\overlay'
> --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repo-manager-location-proprietarysimple -- setuptools wheel:
>
>
> ERROR: Traceback (most recent call last):
> File "C:\Python35-32\lib\runpy.py", line 170, in _run_module_as_main
> "__main__", mod_spec)
> File "C:\Python35-32\lib\runpy.py", line 85, in _run_code
> exec(code, run_globals)
> File "C:\Python35-32\lib\site-packages\pip\__main__.py", line 16, in <module>
> from pip._internal import main as _main # isort:skip # noqa
> File "C:\Python35-32\lib\site-packages\pip\_internal\__init__.py", line 40,
> in <module>
> from pip._internal.cli.autocompletion import autocomplete
> File "C:\Python35-32\lib\site-packages\pip\_internal\cli\autocompletion.py",
> line 8, in <module>
> from pip._internal.cli.main_parser import create_main_parser
> File "C:\Python35-32\lib\site-packages\pip\_internal\cli\main_parser.py",
> line 12, in <module>
> from pip._internal.commands import (
> File "C:\Python35-32\lib\site-packages\pip\_internal\commands\__init__.py",
> line 6, in <module>
> from pip._internal.commands.completion import CompletionCommand
> File "C:\Python35-32\lib\site-packages\pip\_internal\commands\completion.py",
> line 6, in <module>
> from pip._internal.cli.base_command import Command
> File "C:\Python35-32\lib\site-packages\pip\_internal\cli\base_command.py",
> line 25, in <module>
> from pip._internal.index import PackageFinder
> File "C:\Python35-32\lib\site-packages\pip\_internal\index.py", line 41, in
> <module>
> from pip._internal.wheel import Wheel
> File "C:\Python35-32\lib\site-packages\pip\_internal\wheel.py", line 7, in
> <module>
> import compileall
> File "C:\Python35-32\lib\compileall.py", line 20, in <module>
> from concurrent.futures import ProcessPoolExecutor
> File "C:\Python35-32\lib\site-packages\concurrent\futures\__init__.py",
> line 8, in <module>
> from concurrent.futures._base import (FIRST_COMPLETED,
> File "C:\Python35-32\lib\site-packages\concurrent\futures\_base.py", line
> 414
> raise exception_type, self._exception, self._traceback
> ^
> SyntaxError: invalid syntax
> ----------------------------------------
> ERROR:
> Command "'C:\Python35-32\python.exe'
> 'C:\Python35-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\jerry\AppData\Local\Temp\pip-build-env-a6x0i3h0\overlay'
> --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repo-manager-location-proprietarysimple -- setuptools wheel"
> failed with error code 1 in None
I also noticed that running a similar command, C:\Users\J39304\Desktop>python -m pip install auto-py-to-exe, results in the exact same error.
However, when I ran C:\Users\J39304\Desktop>python -m pip install keras it installed just fine.
I have already made sure that I am using the latest version of pip by running python -m pip install --upgrade pip
I have not found any resources for this error.
raise X, Y is Python2-only syntax. Somehow you've managed to install a Python2-only library to Python3 site-packages. You need to cleanup site-packages and install newer versions of libraries.

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