When I deployment don't get any problem to run, but when I trying run with apache wsgi got this error: DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory"
Tried to use ldconfig and setup on environment LD_LIBRARY_PATH but didn't worked. The server is a linux x64 with cx_oracle 7.2.0 and django 1.11.22 with python 2.7.15+ and installing libaio.
root#webservice:/opt/instantclient_11_2# ls -la
lrwxrwxrwx 1 root root 17 Jul 10 15:41 libclntsh.so -> libclntsh.so.11.1
-rwxrwxr-x 1 root root 53865194 Aug 24 2013 libclntsh.so.11.1
-r-xr-xr-x 1 root root 7996693 Aug 24 2013 libnnz11.so
lrwxrwxrwx 1 root root 15 Jul 10 15:41 libocci.so -> libocci.so.11.1
-rwxrwxr-x 1 root root 1973074 Aug 24 2013 libocci.so.11.1
-rwxrwxr-x 1 root root 118738042 Aug 24 2013 libociei.so
-r-xr-xr-x 1 root root 164942 Aug 24 2013 libocijdbc11.so
-r--r--r-- 1 root root 2091135 Aug 24 2013 ojdbc5.jar
-r--r--r-- 1 root root 2739616 Aug 24 2013 ojdbc6.jar
-rwxrwxr-x 1 root root 192365 Aug 24 2013 uidrvci
-rw-rw-r-- 1 root root 66779 Aug 24 2013 xstreams.jarre
root#webservice:/opt/instantclient_11_2# cat /etc/ld.so.conf.d/oracle-instantclient.conf
/opt/instantclient_11_2
export LD_RUN_PATH:
export LD_RUN_PATH=$LD_LIBRARY_PATH
Related
I'm on windows wsl2, and I have 3 pythons. Which one do I keep or should I no touch them? I was reading an article on how to fix import errors and it might be because I have more than 1 python version(more than one pip). When I type python --version and python3 --version, I get 3.9.12 on both
These are usually symbolic links. It helps resolving the main python interpreter without having to specify the full target version.
Try running ls -l. It should gives you something similar to this (in my case I ran ls -l /bin/python*):
lrwxrwxrwx 1 root root 7 Apr 15 2020 /bin/python -> python2
lrwxrwxrwx 1 root root 9 Mar 13 2020 /bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3.6M Mar 8 2021 /bin/python2.7
lrwxrwxrwx 1 root root 9 Feb 25 2022 /bin/python3 -> python3.8
-rwxr-xr-x 1 root root 5.3M Mar 15 2022 /bin/python3.8
lrwxrwxrwx 1 root root 33 Mar 15 2022 /bin/python3.8-config -> x86_64-linux-gnu-python3.8-config
lrwxrwxrwx 1 root root 16 Mar 13 2020 /bin/python3-config -> python3.8-config
-rwxr-xr-x 1 root root 5.8K Jan 13 2020 /bin/python3-wsdump
Very New to Celery/Django
Over the weekend, we upgraded the ubuntu server to 20.04, and while the web interface is up and running and I can see the defined jobs when I attempt to run any job the job does not run.
I am not seeing any errors in the logs (assuming I am looking at the correct apache logs).
Everything is down and I am not sure where to debug celery. If I could find out where the jobs are located then I would try to run using the celery CLI.
Updated from ubuntu 16.04.
It is using mod_wsgi not using a virtual env that I can tell. I believe it is using the system python version 2.7.
I've tried restarting.
Any help/pointers are much appreciated.
The 2.7 python did stick around, probably as you suggested due to the upgrade.
It looks to be the default in the path:
/home/barrow/bin:/home/barrow/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
barrow#server:~$ which python
/usr/bin/python
barrow#server:~$ python
Python 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
There are, of course, other versions of python sitting around.
-rwxr-xr-x 1 root root 5490352 Jun 2 04:49 /usr/bin/python3.8
lrwxrwxrwx 1 root root 33 Jun 2 04:49 /usr/bin/python3.8-config -> x86_64-linux-gnu-python3.8-config
-rwxr-xr-x 1 root root 3674216 Mar 8 06:02 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Mar 8 06:02 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root 33 Feb 20 16:02 /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config
lrwxrwxrwx 1 root root 34 Feb 20 16:02 /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config
-rwxr-xr-x 2 root root 4723808 Feb 20 16:02 /usr/bin/python3.6
-rwxr-xr-x 2 root root 4723808 Feb 20 16:02 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 7 Apr 15 2020 /usr/bin/python -> python2
lrwxrwxrwx 1 root root 14 Apr 15 2020 /usr/bin/python-config -> python2-config
lrwxrwxrwx 1 root root 9 Mar 13 2020 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 16 Mar 13 2020 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 9 Mar 13 2020 /usr/bin/python3 -> python3.8
lrwxrwxrwx 1 root root 16 Mar 13 2020 /usr/bin/python3-config -> python3.8-config
I am able to run the celery command in the CLI, so I removed that post here. I am "searching" for where the job might be. I can't wait until I understand this.
My thoughts are that I might be able to run the job using celery on the command line. Or worst case that would help with the debugging and eliminate is as a culprit.
I'm trying to reproduce results from this repository using docker.
I have completed the pull using
docker pull gasparjan/crnn_ocr:cpu
and run it using
docker run --rm -it -v /home:/data -p 8004:8000 gasparjan/crnn_ocr:cpu
To execute the following command:
python3 predict.py --G 0 --model_path %PATH_TO_MODEL% \
--image_path %PATH_TO_IMAGES% \
--validate --num_instances 512 --max_len 21
I require the PATH_TO_MODEL how do I locate the model.json file that was just pulled?
I've tried using solutions from here but unfortunately I'm unable to locate the pulled directory.
I've also tried downloading the repo from Github and then passing the location of the model.json file and it yields an error
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Luke/Downloads/CRNN-OCR-lite-master/models/OCR_IAM_ver1/model.json'
Please Advise.
I'm using macOS Big Sur.
After running this line:
docker run --rm -it -v /home:/data -p 8004:8000 gasparjan/crnn_ocr:cpu
you will be dropped inside the container's command line. You can look around with ls:
➜ sudo docker run --rm -it -v /home:/data -p 8004:8000 gasparjan/crnn_ocr:cpu
root#0e2914bb1aad:/#
root#0e2914bb1aad:/# ls -la
total 124
drwxr-xr-x 1 root root 4096 Apr 27 13:36 .
drwxr-xr-x 1 root root 4096 Apr 27 13:36 ..
-rwxr-xr-x 1 root root 0 Apr 27 13:36 .dockerenv
drwxr-xr-x 1 root root 4096 May 14 2019 bin
drwxr-xr-x 2 root root 4096 Apr 12 2016 boot
drwxr-xr-x 3 root root 4096 Apr 27 13:35 data
drwxr-xr-x 5 root root 360 Apr 27 13:36 dev
drwxr-xr-x 1 root root 4096 Apr 27 13:36 etc
drwxr-xr-x 2 root root 4096 Apr 12 2016 home
drwxr-xr-x 1 root root 4096 May 14 2019 lib
drwxr-xr-x 1 root root 4096 May 14 2019 lib64
drwxr-xr-x 2 root root 4096 Jan 22 2019 media
drwxr-xr-x 2 root root 4096 Jan 22 2019 mnt
drwxr-xr-x 2 root root 4096 May 14 2019 models
drwxr-xr-x 2 root root 4096 Jan 22 2019 opt
-rw-rw-r-- 1 root root 8034 May 11 2019 predict.py
dr-xr-xr-x 378 root root 0 Apr 27 13:36 proc
drwx------ 1 root root 4096 May 14 2019 root
drwxr-xr-x 1 root root 4096 May 14 2019 run
drwxr-xr-x 1 root root 4096 Jan 22 2019 sbin
drwxr-xr-x 2 root root 4096 Jan 22 2019 srv
dr-xr-xr-x 13 root root 0 Apr 27 13:37 sys
drwxrwxrwt 1 root root 4096 May 14 2019 tmp
-rw-rw-r-- 1 root root 8572 May 10 2019 train.py
drwxr-xr-x 1 root root 4096 Jan 22 2019 usr
-rw-rw-r-- 1 root root 23446 May 10 2019 utils.py
drwxr-xr-x 1 root root 4096 Jan 22 2019 var
root#0e2914bb1aad:/# ls -la /models
total 55892
drwxr-xr-x 2 root root 4096 May 14 2019 .
drwxr-xr-x 1 root root 4096 Apr 27 13:36 ..
-rw-r--r-- 1 root root 490 Jan 24 2019 arguments.txt
-rw-r--r-- 1 root root 11482392 Mar 24 2019 checkpoint_weights.h5
-rw-r--r-- 1 root root 34189880 Jan 24 2019 final_model.h5
-rw-r--r-- 1 root root 11482392 Jan 24 2019 final_weights.h5
-rw-r--r-- 1 root root 136 Jan 24 2019 loss_history.pickle.dat
-rw-r--r-- 1 root root 31729 Jan 24 2019 model.json
-rw-r--r-- 1 root root 15524 Jan 24 2019 model_summary.txt
So the file is at /models/model.json inside the container!
As for the images, I couldn't find any images inside the container. I think you are meant to supply your own. In that case, look at the command (/home:/data). This is a bind mount which means that /home on your PC and /data inside the container are the same folder now.
So I would try adding some images to your PC's /home folder and then, inside the container, running:
python3 predict.py --G 0 --model_path /models/model.json \
--image_path /data \
--validate --num_instances 512 --max_len 21
I am a newbie at this. But I think I have a solution.
I pulled the docker image and it seems like if you replace %PATH_TO_MODEL% with models in your python3 command - it works!
Here is what the final command looks like:
python3 predict.py --G 0 --model_path models \
--image_path %PATH_TO_IMAGES% \
--validate --num_instances 512 --max_len 21
If you do ls once you are inside the docker container, you will be able to see all the directories.
__pycache__ boot dev home lib64 mnt opt proc run srv tmp usr var
bin data etc lib media models predict.py root sbin sys train.py utils.py
I am not sure if this helps, but let me know.
I am using this command:
./configure --enable-2d-adaptivity
in order to create an executable for an open source code I would like to install in a folder outside the container.
But I get this error when it stops:
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
configure: Checking for Python automagic.
configure: No Python automagic.
checking for python... no
configure: error: Cannot find python in your system path`
This code require Python 2.7 and it is installed in /usr/bin.
When I use ls -l :
Singularity> ls -l /usr/bin/python*
-rwxr-xr-x 1 root root 3628976 Sep 30 09:38 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Sep 30 09:38 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root 9 Oct 25 2018 /usr/bin/python3 -> python3.6
lrwxrwxrwx 1 root root 16 Oct 25 2018 /usr/bin/python3-config -> python3.6-config
-rwxr-xr-x 1 root root 384 Apr 11 2018 /usr/bin/python3-futurize
-rwxr-xr-x 1 root root 388 Apr 11 2018 /usr/bin/python3-pasteurize
-rwxr-xr-x 1 root root 364 Aug 22 2016 /usr/bin/python3-qr
-rwxr-xr-x 2 root root 4526456 Oct 8 08:12 /usr/bin/python3.6
lrwxrwxrwx 1 root root 33 Oct 8 08:12 /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config
-rwxr-xr-x 2 root root 4526456 Oct 8 08:12 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 34 Oct 8 08:12 /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config
lrwxrwxrwx 1 root root 10 Oct 25 2018 /usr/bin/python3m -> python3.6m
lrwxrwxrwx 1 root root 17 Oct 25 2018 /usr/bin/python3m-config -> python3.6m-config
So probably a solution could be to set python to point at Python 2.7?
I tried many commands but they didn't worked.
In addition when I run which python it is empty.
How can I fix it?
Should the folder be in the container instead of my home directory?
The folder in which I run the command ./configure --enable-2d-adaptivity is located in the home directory of my account on a super computer. I can see it from the container.
Thank you!
so I suspect I have a Python installation problem. I was doing some coding in python. Everything was running just fine then it just stopped loading scapy for no particular reason at all. Unable to import Scapy. I tried lots of things and in the end gave up on it as it was taking too long to figure out and wasn't really that important anyway.
So now I am doing something else that has a Python dependency. I am using Maltego with some custom transforms that I have downloaded. They are Python dependent and getting these transforms working will save me a ton of time.
The error in Maltego when it runs is:
Traceback (most recent call last):
File "/opt/maltego-nmap/units/nmap_xml_parser.py", line 4, in <module>
from lxml import etree
ImportError: No module named lxml
The python root path in maltego is shown as /usr/bin/python
So I checked my python path:
KALI606:/usr/bin# type -a python
python is /usr/bin/python
python is /bin/python
KALI606:/usr/bin# cd bin/python
bash: cd: bin/python: No such file or directory
KALI606:/usr/bin# cd usr/bin/python
bash: cd: usr/bin/python: No such file or directory
KALI606:/usr/bin# ls -l python*
lrwxrwxrwx 1 root root 7 Nov 18 06:36 python -> python2
lrwxrwxrwx 1 root root 9 Nov 18 06:36 python2 -> python2.7
-rwxr-xr-x 1 root root 3647800 Jan 19 19:54 python2.7
lrwxrwxrwx 1 root root 33 Jan 19 19:54 python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root 16 Nov 18 06:36 python2-config -> python2.7-config
-rwxr-xr-x 1 root root 385 Feb 2 03:10 python2-futurize
-rwxr-xr-x 1 root root 389 Feb 2 03:10 python2-pasteurize
lrwxrwxrwx 1 root root 9 Nov 14 14:13 python3 -> python3.7
-rwxr-xr-x 2 root root 5114928 Mar 10 13:18 python3.7
lrwxrwxrwx 1 root root 33 Mar 10 13:18 python3.7-config -> x86_64-linux-gnu-python3.7-config
-rwxr-xr-x 2 root root 5114928 Mar 10 13:18 python3.7m
lrwxrwxrwx 1 root root 34 Mar 10 13:18 python3.7m-config -> x86_64-linux-gnu-python3.7m-config
-rwxr-xr-x 1 root root 5453504 Feb 25 13:04 python3.8
lrwxrwxrwx 1 root root 16 Nov 14 14:13 python3-config -> python3.7-config
-rwxr-xr-x 1 root root 384 Feb 2 03:10 python3-futurize
-rwxr-xr-x 1 root root 398 Sep 7 2018 python3-jsonschema
lrwxrwxrwx 1 root root 10 Nov 14 14:13 python3m -> python3.7m
lrwxrwxrwx 1 root root 17 Nov 14 14:13 python3m-config -> python3.7m-config
-rwxr-xr-x 1 root root 388 Feb 2 03:10 python3-pasteurize
-rwxr-xr-x 1 root root 364 Dec 15 18:09 python3-qr
-rwxr-xr-x 1 root root 196 Oct 6 2019 python3-tor-prompt
-rwxr-xr-x 1 root root 5902 Oct 1 2018 python3-wsdump
lrwxrwxrwx 1 root root 14 Nov 18 06:36 python-config -> python2-config
lrwxrwxrwx 1 root root 7 Feb 4 14:30 python-faraday -> faraday
This is a mess right?
Any suggestions on how I can sort out Python pls? I feel like I want to just remove all python references and start clean but I have limited knowledge on this. The Maltego error is very similar to the scapy error I had.
I am running the latest version of Kali.
Try to install python2-lxml with something like
sudo apt-get install python2-lxml