Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
1983
views
How do I resolve a TLS Error associated with smtpd?
I found the following in the logs: sssd_kcm[425899]: Starting up postfix/submission/smtpd[425910]: initializing the server-side TLS engine postfix/submission/smtpd[425910]: connect from unknown[::1] postfix/submission/smtpd[425910]: warning: connect to Milter service unix:/run/spamass-milter/spamass...
I found the following in the logs:
sssd_kcm: Starting up
postfix/submission/smtpd: initializing the server-side TLS engine
postfix/submission/smtpd: connect from unknown[::1]
postfix/submission/smtpd: warning: connect to Milter service unix:/run/spamass-milter/spamass-milter.sock: No such file or directory
postfix/submission/smtpd: setting up TLS connection from unknown[::1]
postfix/submission/smtpd: unknown[::1]: TLS cipher list "aNULL:-aNULL:HIGH:MEDIUM:+RC4:@STRENGTH"
postfix/submission/smtpd: SSL_accept:before SSL initialization
postfix/submission/smtpd: SSL_accept:before SSL initialization
postfix/submission/smtpd: SSL_accept:SSLv3/TLS read client hello
postfix/submission/smtpd: SSL_accept:SSLv3/TLS write server hello
postfix/submission/smtpd: SSL_accept:SSLv3/TLS write change cipher spec
postfix/submission/smtpd: SSL_accept:TLSv1.3 write encrypted extensions
postfix/submission/smtpd: SSL_accept:SSLv3/TLS write certificate
postfix/submission/smtpd: SSL_accept:TLSv1.3 write server certificate verify
postfix/submission/smtpd: SSL_accept:SSLv3/TLS write finished
postfix/submission/smtpd: SSL_accept:TLSv1.3 early data
postfix/submission/smtpd: SSL3 alert read:fatal:bad certificate
postfix/submission/smtpd: SSL_accept:error in error
postfix/submission/smtpd: SSL_accept error from unknown[::1]: -1
postfix/submission/smtpd: warning: TLS library problem: error:0A000412:SSL routines::sslv3 alert bad certificate:ssl/record/rec_layer_s3.c:1586:SSL alert number 42:
postfix/submission/smtpd: lost connection after STARTTLS from unknown[::1]
postfix/submission/smtpd: disconnect from unknown[::1] ehlo=1 starttls=0/1 commands=1/2
Those two lines show up any time a user presses a "Password reset" button on a User authentication form. This is happening on all Django projects hosted on a VPS at the moment. Consequently, the server does not send the email that initiates the reset. Instead, users see "Server Error (500)" on the browser. This phenomenon is new. The pages were working months before.
The log entries seem to suggest that the certificates are bad. I have renewed all certs on that server in an attempt to resolve the issue but the it persists. Note that mail submission via remote and local clients are working perfectly.
I would appreciate guidance on how to remedy the situation.
**# postconf | grep cert | grep smtp**
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_CApath = /etc/pki/tls/certs
smtp_tls_cert_file =
smtp_tls_dcert_file =
smtp_tls_dkey_file = $smtp_tls_dcert_file
smtp_tls_eccert_file =
smtp_tls_eckey_file = $smtp_tls_eccert_file
smtp_tls_fingerprint_cert_match =
smtp_tls_key_file = $smtp_tls_cert_file
smtp_tls_scert_verifydepth = 9
smtp_tls_secure_cert_match = nexthop, dot-nexthop
smtp_tls_verify_cert_match = hostname
smtpd_tls_ask_ccert = no
smtpd_tls_ccert_verifydepth = 9
smtpd_tls_cert_file = /etc/letsencrypt/live/site.com/fullchain.pem
smtpd_tls_dcert_file =
smtpd_tls_dkey_file = $smtpd_tls_dcert_file
smtpd_tls_eccert_file =
smtpd_tls_eckey_file = $smtpd_tls_eccert_file
smtpd_tls_req_ccert = no
tlsproxy_client_cert_file = $smtp_tls_cert_file
tlsproxy_client_dcert_file = $smtp_tls_dcert_file
tlsproxy_client_eccert_file = $smtp_tls_eccert_file
tlsproxy_client_scert_verifydepth = $smtp_tls_scert_verifydepth
tlsproxy_tls_ask_ccert = $smtpd_tls_ask_ccert
tlsproxy_tls_ccert_verifydepth = $smtpd_tls_ccert_verifydepth
tlsproxy_tls_cert_file = $smtpd_tls_cert_file
tlsproxy_tls_dcert_file = $smtpd_tls_dcert_file
tlsproxy_tls_eccert_file = $smtpd_tls_eccert_file
tlsproxy_tls_req_ccert = $smtpd_tls_req_ccert
twohot
(11 rep)
Oct 3, 2023, 11:50 AM
• Last activity: May 28, 2025, 02:04 AM
0
votes
1
answers
5600
views
connect() to unix:///tmp/uwsgi_dev.sock failed (2: No such file or directory) while connecting to upstream
I tried to run django application using uwsgi+nginx and the cronjob command is, `* * * * * /usr/local/bin/lockrun --lockfile /path/to/lock_file -- uwsgi --close-on-exec -s /path/to/socket_file --chdir /path/to/project/folder/ --pp .. -w project_name.wsgi -C666 -p 32 -H /path/to/virtualenv/ 1>> /path...
I tried to run django application using uwsgi+nginx and the cronjob command is,
but I receive the error in nginx error log file as,
**019/11/20 06:45:21 [crit] 1986#1986: *2 connect() to unix:///path/to/socket_file failed (2: No such file or directory) while connecting to upstream, client: xxx.xxx.xx.xxx, server: localhost, request: "GET /auth/status/ HTTP/1.1", upstream: "uwsgi://unix:///path/to/socket_file:", host: "xx.xxx.xx.xxx", referrer: "http://xx.xxx.xx.xxx/ "**
the path for the socket_file in nginx configuration file and in cronjob command is same, can any one have idea where I'm making the mistake???
* * * * * /usr/local/bin/lockrun --lockfile /path/to/lock_file -- uwsgi --close-on-exec -s /path/to/socket_file --chdir /path/to/project/folder/ --pp .. -w project_name.wsgi -C666 -p 32 -H /path/to/virtualenv/ 1>> /path/to/success_log 2>> /path/to/error_log
but I receive the error in nginx error log file as,
**019/11/20 06:45:21 [crit] 1986#1986: *2 connect() to unix:///path/to/socket_file failed (2: No such file or directory) while connecting to upstream, client: xxx.xxx.xx.xxx, server: localhost, request: "GET /auth/status/ HTTP/1.1", upstream: "uwsgi://unix:///path/to/socket_file:", host: "xx.xxx.xx.xxx", referrer: "http://xx.xxx.xx.xxx/ "**
the path for the socket_file in nginx configuration file and in cronjob command is same, can any one have idea where I'm making the mistake???
aji prabhakaran
(1 rep)
Nov 20, 2019, 07:00 AM
• Last activity: May 18, 2025, 02:07 AM
0
votes
1
answers
51
views
Cannot access static files for subdomain in nginx
I have a static website and a Django app backend running using gunicorn on port 8000 on a server. I am collecting CSS files for the static website into /mywebsite-deployment/staticDir/homepage/css/static_website.css, and the CSS for the Django templates in /mywebsite-deployment/staticDir/dashboard/c...
I have a static website and a Django app backend running using gunicorn on port 8000 on a server.
I am collecting CSS files for the static website into /mywebsite-deployment/staticDir/homepage/css/static_website.css, and the CSS for the Django templates in /mywebsite-deployment/staticDir/dashboard/css/dashboard.css;
I am able to access the static website using mywebsite.com and www.mywebsite.com with CSS, and the Django backend using app.mywebsite.com but its CSS doesn't load.
The template in which I am trying to access it looks like this:
{% load static %}
My Django app settings.py looks like this:
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'staticFiles'),
]
STATIC_ROOT = '/mywebsite-deployment/staticDir/'
STATIC_URL = 'static/'
This is my nginx config:
ssl_certificate /etc/letsencrypt/live/mywebsite.co/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mywebsite.co/privkey.pem; # managed by Certbot
root /mywebsite-deployment/staticDir/;
index /homepage/index.html;
error_page 404 500 502 503 504 /error.html;
proxy_intercept_errors on; # If proxy errors, let nginx process it
# error_log /var/log/nginx/error.log info;
server {
# If host isn't a mywebsite host, close the connection to prevent host spoofing
server_name _;
listen 80 default_server;
listen 443 ssl default_server;
return 444;
}
# Redirect HTTP requests to HTTPS
server {
server_name mywebsite.co www.mywebsite.co app.mywebsite.co;
listen 80;
return 301 https://$host$uri ; # managed by Certbot
}
# Handle HTTPS static webserver requests
server {
server_name mywebsite.co www.mywebsite.co;
listen 443 ssl; # managed by Certbot
}
# Proxy HTTPS app requests to backend gunicorn service
server {
server_name app.mywebsite.co;
listen 443 ssl; # managed by Certbot
location / { # Catch all - Match everything else not matched in any above location blocks within this server block
proxy_redirect off; # Stop redirects from proxy
proxy_connect_timeout 3; # Abort if service is unreachable
proxy_read_timeout 3; # Abort if the service is unresponsive
include proxy_params;
proxy_pass http://localhost:8000;
}
# If Gunicorn Django proxy app throws an error (like 404), nginx will handle it and show custom error page
location /error.html {
internal;
}
}
When I inspect the template HTML in the browser, I see the URL it's trying to load is: https://app.mywebsite.co/static/dashboard/css/dashboard.css , but that doesn't load.
I can access the homepage CSS as: ://www.mywebsite.co/homepage/css/static_website.css
and the dashboard CSS as:
://www.mywebsite.co/dashboard/css/dashboard.css
How can I use the right path to view the CSS in the dashboard? I feel like this is an nginx config issue, but I am new to nginx and don't know how to solve this. Please help.
Vee
(3 rep)
Apr 7, 2025, 02:24 AM
• Last activity: Apr 7, 2025, 03:29 PM
8
votes
2
answers
21989
views
How to resolve (40: Too many levels of symbolic links) on Ubuntu 10.04 AWS EC2 Instance
In my EC2 Ubuntu 18.04 instance, I have created an **django.conf** file at */etc/nginx/sites-available* The .conf file looks like so : server { listen 80; server_name *[url_name]*; location / { include proxy_params; proxy_pass http://unix:/home/ubuntu/ZTS-JOBCARDS/app.sock; } } and when I ran `sudo...
In my EC2 Ubuntu 18.04 instance, I have created an **django.conf** file at */etc/nginx/sites-available*
The .conf file looks like so :
server {
listen 80;
server_name *[url_name]*;
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/ZTS-JOBCARDS/app.sock ;
}
}
and when I ran
sudo nginx -t
before trying to link the files to **/etc/nginx/sites-enabled/** the result came back positive
However, after I had linked the files like so: sudo ln -s django.conf /etc/nginx/sites-enabled/
The nginx -t
command returns the following error ;
> nginx: [emerg] open() "/etc/nginx/sites-enabled/django.conf" failed
> (40: Too many levels of symbolic links) in /etc/nginx/nginx.conf:62
> nginx: configuration file /etc/nginx/nginx.conf test failed
What would cause this error and are their any guides to fixing it ?
KyleStranger
(183 rep)
Jan 21, 2022, 08:50 AM
• Last activity: Jan 6, 2025, 08:37 AM
0
votes
1
answers
648
views
Why does Django throw ImproperlyConfigured when I try to import in the Python shell?
This one kept throwing me when I started Django. Suppose you have a project `project` with an app `app`, and you want to inspect it. So you import parts of it in the Python shell: ``` (virtualenv) $ PYTHONPATH=. python Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] on linux Type...
This one kept throwing me when I started Django. Suppose you have a project
project
with an app app
, and you want to inspect it. So you import parts of it in the Python shell:
(virtualenv) $ PYTHONPATH=. python
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import project.app.views
(...cut traceback...)
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS,
but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE
or call settings.configure() before accessing settings.
Fine. So you set DJANGO_SETTINGS_MODULE
:
(virtualenv) $ PYTHONPATH=. DJANGO_SETTINGS_MODULE=project.project.settings python
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import project.app.views
(...cut traceback...)
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
with no explanation as to what to do next.
Marnanel Thurman
(8759 rep)
Sep 22, 2023, 02:36 PM
0
votes
1
answers
2236
views
Django can not connect to MySQL database over ubuntu 10.04
I got a simple Django 1.3.* project, i would like to run it over my localhost. I installed all necessary modules like: python-mysqldb, rptz etc... I have ubuntu 10.04 installed with python 2.7.2. When i tried to start project in terminal thor@thor:/media/SAJAT - Projects/project/simple project$ pyth...
I got a simple Django 1.3.* project, i would like to run it over my localhost.
I installed all necessary modules like: python-mysqldb, rptz etc...
I have ubuntu 10.04 installed with python 2.7.2.
When i tried to start project in terminal
thor@thor:/media/SAJAT - Projects/project/simple project$ python manage.py runserver
I got the following error message:
> Validating models...
Unhandled exception in thread started by >
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 88, in inner_run
self.validate(display_num_errors=True)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 249, in validate
num_errors = get_validation_errors(s, app)
File "/usr/lib/python2.7/dist-packages/django/core/management/validation.py", line 102, in get_validation_errors
connection.validation.validate_field(e, opts, f)
File "/usr/lib/python2.7/dist-packages/django/db/backends/mysql/validation.py", line 14, in validate_field
db_version = self.connection.get_server_version()
File "/usr/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 338, in get_server_version
self.cursor()
File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 250, in cursor
cursor = self.make_debug_cursor(self._cursor())
File "/usr/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 322, in _cursor
self.connection = Database.connect(**kwargs)
File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on '172.17.30.101' (110)")
I have no idea where this IP address comes from 172.17.30.101' (110) because of my mysql server has been installed on my computer(localhost)
Here is my settings.py file
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'dbname', # Or path to database file if using sqlite3.
'USER': 'dbuser', # Not used with sqlite3.
'PASSWORD': '123456', # Not used with sqlite3.
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
#'PORT': '3306', i tried with this too # Set to empty string for default. Not used with sqlite3.
#'PORT': '3360', i tried with this too # Set to empty string for default. Not used with sqlite3.
},
# 'read': {
# 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
# 'NAME': 'newsonia', # Or path to database file if using sqlite3.
# 'USER': 'dbuser', # Not used with sqlite3.
# 'PASSWORD': 'dbname', # Not used with sqlite3.
# 'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
# 'PORT': '', # Set to empty string for default. Not used with sqlite3.
# }
}
I have no idea how should be resolve this kind of errors.
Nagy Ervin
(11 rep)
Aug 16, 2014, 08:57 AM
• Last activity: Aug 17, 2023, 08:02 AM
0
votes
0
answers
500
views
Bash commands not working in pipenv shell
I am working on learning Django for backend and full-stack development. I have that working with pipenv for virtual environments can be a pain in the rear end (at least on macOS). In the terminal, I get into the pipenv shell and some common bash commands no longer work (e.g. 'ls' and some commands s...
I am working on learning Django for backend and full-stack development. I have that working with pipenv for virtual environments can be a pain in the rear end (at least on macOS). In the terminal, I get into the pipenv shell and some common bash commands no longer work (e.g. 'ls' and some commands stored to the PATH variable like 'code'). I have attached a video to illustrate how this is not working:
YouTube video of pipenv shell bash commands not working
Has anyone else ever experienced this issue? Thanks!
EDIT: Per userbase request, I have included the text:
mbGem:booklist lamidotijjo$ echo $PATH
/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Users/lamidotijjo/.dotnet/tools:/Library/Apple/usr/bin:/Users/lamidotijjo/ia:/usr/local/mysql-8.0.31-macos12-arm64/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
mbGem:booklist lamidotijjo$ pwd
/Users/lamidotijjo/Projects/booklist
mbGem:booklist lamidotijjo$ pipenv install django
Installing django...
Installing dependencies from Pipfile.lock (79baf8)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
mbGem:booklist lamidotijjo$ pipenv shell
Launching subshell in virtual environment...
The default interactive shell is now zsh.
To update your account to use zsh, please run
chsh -s /bin/zsh
.
For more details, please visit https://support.apple.com/kb/HT208050 .
bash-3.2$ . /Users/lamidotijjo/.local/share/virtualenvs/Projects-3XO0tcpO/bin/activate
(Projects) bash-3.2$ ls
bash: ls: command not found
(Projects) bash-3.2$ ls -l
bash: ls: command not found
(Projects) bash-3.2$ code
bash: code: command not found
(Projects) bash-3.2$ code .
bash: code: command not found
(Projects) bash-3.2$
Ubuntuer
(1 rep)
Jan 5, 2023, 06:27 PM
• Last activity: Jan 5, 2023, 07:34 PM
1
votes
1
answers
3102
views
TypeError: __init__() missing 1 required positional argument: 'get_response ,Making Dajngo API endpoints & exposing it?
``` File "/home/Desktop/booklib/env/lib/python3.8/site-packages/rest_framework/authentication.py", line 126, in authenticate self.enforce_csrf(request) File "/home/Desktop/booklib/env/lib/python3.8/site-packages/rest_framework/authentication.py", line 135, in enforce_csrf check = CSRFCheck() TypeErr...
File "/home/Desktop/booklib/env/lib/python3.8/site-packages/rest_framework/authentication.py", line 126, in authenticate
self.enforce_csrf(request)
File "/home/Desktop/booklib/env/lib/python3.8/site-packages/rest_framework/authentication.py", line 135, in enforce_csrf
check = CSRFCheck()
TypeError: __init__() missing 1 required positional argument: 'get_response'
[21/Dec/2021 14:37:05] "GET /api/ HTTP/1.1" 500 112898
# **api/serializers.py**
rest_framework import serializers
from book.models import Book
class BookSerializer(serializers.ModelSerializer):
class Meta:
model = Book
fields = ('title', 'author','summary', 'isbn')
** Create your views here :api/views.py**
django.shortcuts import render
from rest_framework import generics
from book.models import Book
from .serializers import BookSerializer
class BookAPIView(generics.ListAPIView):
queryset = Book.objects.all()
serializer_class = BookSerializer
**# api/urls.py**
django.urls import path
from .views import BookAPIView
urlpatterns = [
path('', BookAPIView.as_view())
]
Vivek Yadav
(9 rep)
Dec 22, 2021, 04:10 AM
• Last activity: May 12, 2022, 09:03 AM
0
votes
1
answers
931
views
How to export a list of IP addresses as a single local variable?
In Django, one has to specify the environment variable `ALLOWED_HOSTS` to define a list of server's IP addresses that are allowed to host a Django website. For example: `ALLOWED_HOSTS=['localhost', '127.0.0.1', '1.2.3.4']`, which means that if I'm logged locally on my webserver, then I can access th...
In Django, one has to specify the environment variable
ALLOWED_HOSTS
to define a list of server's IP addresses that are allowed to host a Django website. For example:
ALLOWED_HOSTS=['localhost', '127.0.0.1', '1.2.3.4']
, which means that if I'm logged locally on my webserver, then I can access the Django website locally. But globally, one can also access the server at 1.2.3.4. Developers frequently specify this environment variable in an environment file, such as .env
, which is then parsed by Django.
In my case, I have to set this environment variable on the Ubuntu Linux server, such as, say, locally; it would look like this:
export ALLOWED_HOSTS=['localhost', '127.0.0.1', '1.2.3.4']
Now, this command doesn't work. Neither does work the command
export ALLOWED_HOSTS="['localhost', '127.0.0.1', '1.2.3.4']"
or
export ALLOWED_HOSTS='localhost', '127.0.0.1', '1.2.3.4'
or
export ALLOWED_HOSTS="[localhost, 127.0.0.1, '1.2.3.4]"
In the first and the third cases, one will get an error from bash due to incorrect syntax. In the 2nd and 4th cases, Django will simply not understand the variable. Yes, it is possible to pass the command
export ALLOWED_HOSTS='localhost'
which will be understood by Django, but this assumes only one allowed IP address.
But I'm strongly convinced that it must be possible to somehow pass a list of IP addresses as a Linux environment variable, which will be understood by Django. But how?
sequence
(321 rep)
Feb 9, 2022, 04:41 PM
• Last activity: Mar 27, 2022, 12:56 PM
3
votes
1
answers
1436
views
How Do I Package a Django Website for Debian (Not a Python Package or Egg)?
I have been searching for the last two weeks and chased myself into multiple dead ends trying to figure out the path that takes me where I want to go. However I finally have to admit that my answer isn't clearly posted anywhere, and here we are. I'll start off my clarifying: I don't want to build a...
I have been searching for the last two weeks and chased myself into multiple dead ends trying to figure out the path that takes me where I want to go. However I finally have to admit that my answer isn't clearly posted anywhere, and here we are.
I'll start off my clarifying: I don't want to build a redistributable Django "App" which seems to mean "plugin" - This isn't a python plugin, it's a full fledged website with an FCGI server, /etc/init.d script, config file in /etc/djangoapps and a requirements.txt for the plugins my site uses.
I want to build a deb package to allow me to deploy to a Dev and Prod server from a build server (I'm using Bamboo, but Jenkins should be the same principle.)
I also want to do this on Debian 7 Wheezy, not Ubuntu. PKGME Seems to do the job on Ubuntu and Debian 8, however it fails to install in a functional state in Wheezy, and I was unable to find a way to fix it.
So I went with trying setuptools, stdeb, and debuild to create my package, which causes me to wind up with an egg, inside a deb, that does not contain any of my /etc or /usr files.
So what is the proper method here?
Routhinator
(136 rep)
Sep 4, 2014, 11:55 AM
• Last activity: Mar 16, 2022, 01:04 AM
0
votes
1
answers
3274
views
E: Unable to locate package postgresql-server-dev-10 in Ubuntu 18.04
I am writing a Django app with postgresql, using Docker. However, for some reason building returns the error ```"E: Unable to locate package postgresql-server-dev-10 The command '/bin/sh -c apt-get update && apt-get install postgresql-server-dev-10 gcc python3-dev musl-dev' returned a non-zero code:...
I am writing a Django app with postgresql, using Docker. However, for some reason building returns the error
"E: Unable to locate package postgresql-server-dev-10
The command '/bin/sh -c apt-get update && apt-get install postgresql-server-dev-10 gcc python3-dev musl-dev' returned a non-zero code: 100
.
I tried changing it to apt-get install postgresql postgresql-client
, I tried also installing python, but nothing seems to work. Running apt install postgresql-server-dev-10
in my terminal works (I already had it installed), but when building it fails (-compose build
).
My Dockerfile is:
# pull official base image
FROM python:3.8
# set work directory
WORKDIR /weather_api
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install psycopg2 dependencies
RUN apt-get update \
&& apt-get install postgresql-server-dev-10 gcc python3-dev musl-dev
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy project
COPY . .
docker-compose.yml is:
version: '3.8'
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./:/weather_api/
ports:
- 8000:8000
env_file:
- ./.env.dev
db:
image: postgres:10.19
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=lavinia
- POSTGRES_PASSWORD=#123$$
- POSTGRES_DB=weatherdb
volumes:
postgres_data:
and requirements.txt
Django==3.2.9
psycopg2-binary==2.9.1
If anyone could help me I would be so, so grateful. I really couldn't find anything helpful online and I am a beginner. Thank you!!
bethHarmon
(3 rep)
Dec 7, 2021, 02:59 PM
• Last activity: Dec 7, 2021, 03:47 PM
0
votes
1
answers
40
views
How can I put Django's settings.py in source control, while still making local adjustments?
In a Django project, the configuration is kept in a file called `settings.py`. Deployments will generally need to make local tweaks (such as setting `LOCAL_HOSTS`). These tweaks cannot live in the local copy of `settings.py`, because it will confuse source control. How can we resolve this?
In a Django project, the configuration is kept in a file called
settings.py
. Deployments will generally need to make local tweaks (such as setting LOCAL_HOSTS
).
These tweaks cannot live in the local copy of settings.py
, because it will confuse source control.
How can we resolve this?
Marnanel Thurman
(8759 rep)
Oct 12, 2021, 08:54 PM
1
votes
0
answers
3962
views
Why the .sock file not getting generated for uwsgi?
I have already banged my head for last 6 hours, and nothing seems to be working for me. I am trying to host Django through nginx and uwsgi. As per the best of my understanding and study I have configured nginx.conf and uwsgi.ini files. nginx.conf # mysite_nginx.conf # the upstream component nginx ne...
I have already banged my head for last 6 hours, and nothing seems to be working for me.
I am trying to host Django through nginx and uwsgi. As per the best of my understanding and study I have configured nginx.conf and uwsgi.ini files.
nginx.conf
# mysite_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
server unix:/tmp/abc.sock; # for a file socket
}
# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name localhost; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 2048M; # adjust to taste
# Django media
location /media {
alias //media; # your Django project's media files - amend as required
}
location /static {
alias //static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
include //uwsgi_params; # the uwsgi_params file you installed
uwsgi_param REMOTE_USER $remote_user;
uwsgi_param DATE_GMT $date_gmt;
uwsgi_param DATE_LOCAL $date_local;
uwsgi_param AUTH_TYPE Basic;
uwsgi_read_timeout 600s;
uwsgi_pass django;
}
}
uwsgi.ini
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir = /site
# Django's wsgi file
module = pjgweb.wsgi:application
# the virtualenv (full path)
home = //ENV
# process-related settings
# gid
gid = www-data
# uid
uid = www-data
# master
master = true
# maximum number of worker processes
processes = 6
# maximum number of threads for each worker process
threads = 5
# the socket (use the full path to be safe
socket = /tmp/abc.sock
# ... with appropriate permissions - may be needed
chmod-socket = 666
# clear environment on exit
vacuum = true
thread_lock = true
python_thread = true
# set the DJANGO MODULE SETTINGS
env = DJANGO_SETTINGS_MODULE=pjintegweb.settings_production
# Log to
logto = //uwsgi-app.log
# Statistics
stats = :9191
stats-http = true
- I have also created the symbolic links for both nginx.conf and uwsgi.ini.
- I did configure emperor.uwsgi.service file for systemd
[Unit]
Description=uWSGI Emperor service
After=syslog.target
[Service]
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all
[Install]
WantedBy=multi-user.target
When I check the nginx log file, I see below
: x.x.x.x, server: x.x.x.x, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/run/uwsgi/abc.sock:", host: "x.x.x.x"
2021/06/09 16:05:37 [crit] 1949#1949: *1 connect() to unix:/run/uwsgi/abc.sock failed (2: No such file or directory) while connecting to upstream, client: x.x.x.x, server: x.x.x.x, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/run/uwsgi/abc.sock:", host: "x.x.x.x"
2021/06/09 16:05:37 [crit] 1949#1949: *1 connect() to unix:/run/uwsgi/abc.sock failed (2: No such file or directory) while connecting to upstream, client: x.x.x.x, server: x.x.x.x, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/run/uwsgi/abc.sock:", host: "x.x.x.x"
2021/06/09 16:39:04 [alert] 2890#2890: *1 open socket #21 left in connection 3
2021/06/09 16:39:04 [alert] 2890#2890: *2 open socket #22 left in connection 4
2021/06/09 16:39:04 [alert] 2890#2890: aborting
uwsgi logs
bind(): No such file or directory [core/socket.c line 230]
*** Starting uWSGI 2.0.19.1 (64bit) on [Wed Jun 9 18:48:43 2021] ***
compiled with version: 7.5.0 on 02 June 2021 07:22:38
os: Linux-5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020
machine: x86_64
clock source: unix
detected number of CPU cores: 12
current working directory: /
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /
your processes number limit is 127942
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/abc.sock fd 3
Python version: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
PEP 405 virtualenv detected: //ENV
Set PythonHome to //ENV
Python main interpreter initialized at 0x55cc047f50c0
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 802648 bytes (783 KB) for 30 cores
*** Operational MODE: preforking+threaded ***
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x55cc047f50c0 pid: 2828 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 2828)
spawned uWSGI worker 1 (pid: 2833, cores: 5)
spawned uWSGI worker 2 (pid: 2834, cores: 5)
spawned uWSGI worker 3 (pid: 2835, cores: 5)
spawned uWSGI worker 4 (pid: 2840, cores: 5)
spawned uWSGI worker 5 (pid: 2845, cores: 5)
spawned uWSGI worker 6 (pid: 2850, cores: 5)
*** Stats server enabled on :9191 fd: 21 ***
SIGINT/SIGQUIT received...killing workers...
worker 1 buried after 1 seconds
worker 2 buried after 1 seconds
worker 3 buried after 1 seconds
worker 4 buried after 1 seconds
worker 5 buried after 1 seconds
worker 6 buried after 1 seconds
goodbye to uWSGI.
VACUUM: unix socket /tmp/abc.sock removed.
- When I execute the below command, I do not see any error, but the it never returns to the command line ever. Not sure why
uwsgi --ini uwsgi.ini
[uWSGI] getting INI configuration from /path_to/uwsgi.ini
It remains there for ever. I have seen multiple post on the internet, but none of them seems to helping me. Please help. Thank you.
New Logs:
--- no python application found, check your startup logs for errors ---
[pid: 9219|app: -1|req: -1/1] x.x.x.x () {38 vars in 707 bytes} [Thu Jun 10 09:26:20 2021] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
user3521180
(119 rep)
Jun 9, 2021, 02:14 PM
• Last activity: Jun 10, 2021, 07:20 AM
2
votes
0
answers
9039
views
No such file or directory when trying to COPY file in docker container
This question was asked before. However I can't seem to fix this. I am trying to COPY a file to my docker container, but it keeps telling me that the directory doesn't exist, even though it does. I can copy other folders, but not this specific one. My directory structure simplified: ``` - app --.env...
This question was asked before. However I can't seem to fix this. I am trying to COPY a file to my docker container, but it keeps telling me that the directory doesn't exist, even though it does. I can copy other folders, but not this specific one.
My directory structure simplified:
- app
--.envs
-- .local
-- .django
--requirements
-- production
-- local
--compose
-- morefiles
When I run `COPY ./requirements /requirements
then this works without a problem. But when I run
COPY ./.envs/.local/.django /
` it tells me:
> Service 'django' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder264874195/.envs/.local/.django: no such file or directory
I assume is that .envs
is being somewhere excluded but I don't know where. I checked the docker-ignore file like recommended in [
COPY failed: stat /var/lib/docker/tmp/docker-builder918577595/...](https://github.com/moby/moby/issues/34986) , but also if I delete all content in the dockerignore
I get the same error.
I tried renaming the folder without the .
but still the same result. Not really sure what else I can try. I tried changing paths moving the command within the Dockerfile
but nothing. I get the same behaviour with ADD.
My docker-compose
file:
version: '3'
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
services:
django:
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: mywebsite_local_django
depends_on:
- postgres
volumes:
- .:/app
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports:
- "8000:8000"
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: mywebsite_production_postgres
volumes:
- local_postgres_data:/var/lib/postgresql/data
- local_postgres_data_backups:/backups
env_file:
- ./.envs/.local/.postgres
And here is my dockerfile:
FROM python:3.8-alpine
COPY ./.envs/.production/.django /
COPY ./compose/local/django/pre_deploy_hook /
RUN chmod +x /pre_deploy_hook && /pre_deploy_hook
ENV PYTHONUNBUFFERED 1
ARG ADMIN_PORT=some_default_value
ENV ADMIN_PORT=${ADMIN_PORT}
ARG DJANGO_AWS_ACCESS_KEY_ID=defaultvalueoverwritteninnextline
ENV DJANGO_AWS_ACCESS_KEY_ID=${DJANGO_AWS_ACCESS_KEY_ID}
ARG DJANGO_AWS_SECRET_ACCESS_KEY=defaultvalueoverwritteninnextline
ENV DJANGO_AWS_SECRET_ACCESS_KEY=${DJANGO_AWS_SECRET_ACCESS_KEY}
ARG DJANGO_AWS_STORAGE_BUCKET_NAME=defaultvalueoverwritteninnextline
ENV DJANGO_AWS_STORAGE_BUCKET_NAME=${DJANGO_AWS_STORAGE_BUCKET_NAME}
ARG DJANGO_SECRET_KEY=defaultvalueoverwritteninnextline
ENV DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
RUN apk update \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
# Pillow dependencies
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
# CFFI dependencies
&& apk add libffi-dev py-cffi \
# Translations dependencies
&& apk add gettext \
# https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell
&& apk add postgresql-client \
## Needed for sphinx https://github.com/pydanny/cookiecutter-django/issues/1747
&& apk add make
##Needed when installing pandas as requirement
#RUN apk add --update curl gcc g++
#RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
# Requirements are installed here to ensure they will be cached.
COPY ./requirements /requirements
RUN pip install -r /requirements/local.txt
COPY ./compose/production/django/entrypoint /entrypoint
RUN sed -i 's/\r//' /entrypoint
RUN chmod +x /entrypoint
COPY ./compose/local/django/start /start
RUN sed -i 's/\r//' /start
RUN chmod +x /start
WORKDIR /app
ENTRYPOINT ["/entrypoint"]
Could it be that I specify the .env file in the compose file? Because by placing the file into another folder it works.... But that's not what I want...
Micromegas
(121 rep)
Mar 4, 2020, 03:53 PM
• Last activity: Sep 5, 2020, 05:42 PM
0
votes
1
answers
1836
views
Adding directory to PATH -- Ubuntu
I realize that there are several similar questions out there and I'm unsure if I'm simply misunderstanding the solutions. I only recently began using Ubuntu, so I'm still familiarizing myself with everything. I'm trying to set up the Django web-development framework and when I install it via the ter...
I realize that there are several similar questions out there and I'm unsure if I'm simply misunderstanding the solutions. I only recently began using Ubuntu, so I'm still familiarizing myself with everything.
I'm trying to set up the Django web-development framework and when I install it via the terminal, I receive this message:
> "WARNING: The script django-admin is installed in '/home/bp102412/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location."
The following is what I've tried so far:
=$PATH:home/bp102412/.local/bin
in .bash_profile
and
if [ -d "new_dir" ] ; then
PYTHONPATH="$PYTHONPATH:new_dir"
fi
EXPORT $PYTHONPATH
But, I was also reading that you shouldn't use
on bash_profile.
I've restarted the shell after each change to the file and received the message each time, so I'd appreciate it if someone could point out what I'm doing wrong.
Note: I found that if I source ~/.bash_profile
that it solves the problem, but I don't want to source it each time I plan to use this package in the terminal, I'd like it to be included in the PATH
each time the terminal starts.
Brenden Price
(101 rep)
Jun 13, 2020, 09:04 AM
• Last activity: Jun 13, 2020, 09:25 PM
3
votes
1
answers
84254
views
Python "SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/docutils/"
**PROBLEM** - Whatever I try to install from terminal with pip (macOS 10.12) I get this error message - I may have installed and fully deleted **homebrew** before but I am not sure how to solve this **Installs I try to run** (all cases same error message) ``` pip install -r requirements.txt pip inst...
**PROBLEM**
- Whatever I try to install from terminal with pip (macOS 10.12) I get this error message
- I may have installed and fully deleted **homebrew** before but I am not sure how to solve this
**Installs I try to run** (all cases same error message)
pip install -r requirements.txt
pip install django-storages
pip install ssl
**ERROR MESSAGE**
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/django-storages/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/django-storages/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/django-storages/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/django-storages/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/django-storages/
Could not fetch URL https://pypi.org/simple/django-storages/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/django-storages/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement django-storages (from versions: none)
ERROR: No matching distribution found for django-storages
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
**Tried Solutions**
- https://stackoverflow.com/a/59280089/10270590
- https://stackoverflow.com/questions/53742171/pip-tls-ssl-however-the-ssl-module-in-python-is-not-available-problem
- https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in/59280089#59280089
sogu
(141 rep)
Apr 18, 2020, 06:00 PM
• Last activity: Apr 18, 2020, 09:28 PM
0
votes
0
answers
269
views
nginx fails while the website somehow still works
**Description** - I have built my Django3, gunicorn, nginx, Ubuntu 18.04, Digital Ocean project based on this [guide](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04). I only had 1 problem that it does not shows the CSS and all other static files like images....
**Description**
- I have built my Django3, gunicorn, nginx, Ubuntu 18.04, Digital Ocean project based on this [guide](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04) . I only had 1 problem that it does not shows the CSS and all other static files like images. Before during the whole guide nginx have given the correct answers as the guide says and also currently the html site still online and running
- To solve this I was in the process of using this [another guide](https://youtu.be/Y-CT_l1dnVU?t=954) to make my static files displayed on my site.
I have done all the steps what the creator recommended but at the
**What I have tried**
- After each step of the following [1.2.3...] commands I have executed the following commands to refresh:
-
manage.py collectstatic
- nginx -t && sudo systemctl restart nginx
- systemctl restart gunicorn
- 1.RUN: ln -s /etc/nginx/sites-available/ch-project /etc/nginx/sites-enabled
- 1.RESULT: : failed to create symbolic link '/etc/nginx/sites-enabled/ch-project': File exists
- 2.RUN: /etc/nginx/sites-enabled/my-project
- 2.RESULT: -bash: /etc/nginx/sites-enabled/my-project: Permission denied
- 3.RUN: status nginx.service
- 3.RESULT:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-03-26 13:27:08 UTC; 13s ago
Docs: man:nginx(8)
Process: 11111 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 11111 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 11111 (code=exited, status=0/SUCCESS)
- 4.RUN: nginx -t
- 4.RESULT:
nginx: [emerg] open() "/etc/nginx/sites-enabled/myproject" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
nginx: configuration file /etc/nginx/nginx.conf test failed
- 5. Nginex should be Ok otherwise because the html on the website loads and works perfectly. This [stack overflow](https://stackoverflow.com/questions/41042434/unable-to-start-nginx-server-in-ubuntu-server) post says I should maybe do something with the security of the .conf
but in that case they talk about a worldpres site so I don't know how to implement that here.
- 6. I have tried this [stack overflow](https://stackoverflow.com/questions/22306006/configuration-file-etc-nginx-nginx-conf-test-failed-how-do-i-know-why-this-h) post's answer previously, bellow the answer it has a subpost to further configure RUN: nginx -c /etc/nginx/sites-enabled/default -t
- 6.RESULT:
nginx: [emerg] "server" directive is not allowed here in /etc/nginx/sites-enabled/default:21
nginx: configuration file /etc/nginx/sites-enabled/default test failed
sogu
(141 rep)
Mar 26, 2020, 03:19 PM
0
votes
0
answers
24
views
which directory is unsafe for deployment?
I'm going to deploy a Django web-application, with Nginx as the webserver And I wanna deploy it on /opt/ directory. My question is: Which permissions should I set to /opt/ and which I shouldn't. In fact, I'm worried about security issues that changing the permissions in /opt/ will effect.
I'm going to deploy a Django web-application, with Nginx as the webserver And I wanna deploy it on /opt/ directory.
My question is: Which permissions should I set to /opt/ and which I shouldn't. In fact, I'm worried about security issues that changing the permissions in /opt/ will effect.
Kamran Hosseini
(193 rep)
Nov 27, 2019, 09:05 PM
1
votes
0
answers
292
views
How to run Django on Unix server (MobaXterm)?
While server (127.0.0.1) works just fine on PC using Pycharm which uses the Django 'GUI' framework, I've tried to execute the command on unix server (MobaXterm) but it just says that 10.1...1..69 (my own PC IP address) refused to connect. I've changed the ALLOWED_HOSTS = ['*']. But still, it doesn't...
While server (127.0.0.1) works just fine on PC using Pycharm which uses the Django 'GUI' framework, I've tried to execute the command on unix server (MobaXterm) but it just says that 10.1...1..69 (my own PC IP address) refused to connect.
I've changed the ALLOWED_HOSTS = ['*']. But still, it doesn't work.
By running [file leading to python directory]/python manage.py runserver 0.0.0.0:8080, there is a starting development server at http://0.0.0.0:8080/ .
However, when I tried to open this in Chrome (http://10.1...1..69:8080/) , it just says it refused to connect.
Can I check if I did everything correctly? Are there any additional steps that I need to make amendments to in order to run Django on Unix server (MobaXterm)?
reallyneedhelp
(11 rep)
Jul 17, 2019, 07:10 AM
7
votes
1
answers
17405
views
CentOS 7 | python3: error while loading shared libraries: libpython3.5m.so.1.0
I am deploying a django server. I've already installed python 3.5 without errors, but for some problems when I tried to compile mod_wsgi (so I could share the `django` app in an intranet environment with apache): ./configure --with-python=/usr/local/bin/python3.5 it told me that Failed to locate the...
I am deploying a django server.
I've already installed python 3.5 without errors, but for some problems when I tried to compile mod_wsgi (so I could share the
django
app in an intranet environment with apache):
./configure --with-python=/usr/local/bin/python3.5
it told me that Failed to locate the Python library /usr/local/lib/libpython3.3m.so.
Searching for the solution on Google, I found this solution explaining that I needed to recompile python3 with --enable-shared flag.
so, I proceeded to remove python3 and python3.5 from /usr/local/bin
and recompiled python3. Everything was fine, until I tried to check the python version with *python3 --version* and I got the following:
[rortega@Production Python-3.5.2]$ python3 --version
python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
I can't find any solution to this.
Rafael Ortega
(173 rep)
Oct 27, 2016, 06:27 PM
• Last activity: Jul 12, 2019, 09:20 AM
Showing page 1 of 20 total questions