Solving the errors in running Open AI on Ubuntu
While the default version on Ubuntu 20.04 for Python is 3.8, I've added Python 3.11.5 (latest version).
Errors
GPTSimpleVectorIndex is deprecated
Attempting to run python3.11 model-ai.py and I'm seeing the following response
Update Python on Ubuntu
Ubuntu 20.04 comes with Python 3.8 installed. If you run the update script, you'll be informed that the latest version of Python is running. But here is the kicker, the actual latest version is currently 3.11.6... see https://www.python.org/downloads/source/
Use the following commands to download the Python 3.11.6 source code
Could not get lock /var/lib/apt/lists/lock
Logging into the server, and there are packages to be updated. You know the standard Ubuntu / Linux response
5 updates can be applied immediately.
To see these additional updates run: apt list --upgradable
3 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm
Followed by the action
How to install PHP 8.1 on Ubuntu 20.04
Update Ubuntu 20.04
To begin update the server using the command
sudo apt update && sudo apt upgrade -y
For more details about this process see How To Update All Packages Linux.
PHP version
Check the current PHP version using
How do you clear caches on Ubuntu?
At first, I attempted
echo 1 > /proc/sys/vm/drop_caches
Response
-bash: /proc/sys/vm/drop_caches: Permission denied
Adding sudo in front of the command was met with the same result. What about if I execute the shell as root
sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches'
Success. Caches cleared.
flask_debugtoolbar module doesn't exist
Error when running ckan.ini init
from flask_debugtoolbar import DebugToolbarExtension
ModuleNotFoundError: No module named 'flask_debugtoolbar'
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Then check your location is
cd /usr/lib/ckan/default/src
Ubuntu checking if pip is install and getting ImportError: cannot import name 'appdirs' from 'pip._vendor'
My goal was to install a requirements.txt file using pip. First, I wanted to cross-check if I had pip installed on Ubuntu. Easy to do by running a simple command:
pip -V
However, I was receiving the following response
How To Install Apache Solr 8.11 on Ubuntu
In this article I'll walk through the steps I went through to install Solr on Ubuntu.
Step 1: Java
Check if Java is installed on your server:
java -version
Not there - then Java is the first step for you to set up for Solr. JAVA SE 8 or Later is required to run Apache Solr 8. Utilisation taking after order to check in the event that you have Java introduced as of now on your system.
ckan.ini issues
Focusing on the ckan.ini file (/etc/ckan/default/ckan.ini). When I run the commands to recreate the database tables for CKAN:
cd /usr/lib/ckan/default/src/ckan
ckan -c /etc/ckan/default/ckan.ini db init
The response I'm getting is:
server 500 error - 'Internal server error' on Nginx
Finding the issue with a server 500 error
The Nginx error logs are showing too much detail.
Nginx logs and test
There are no errors in the nginx log and sudo nginx -t looks fine
sudo nginx -t
Response
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful