I need to update postgis extenstion from 2.4.5 to 2.5.1. When I use command:
ALTER EXTENSION postgis UPDATE;
I got the following message:
version "2.4.5" of extension "postgis" is already installed.
Specifying 2.5.1 version directly:
ALTER EXTENSION postgis UPDATE to "2.5.1";
results in the following response:
ERROR: extension "postgis" has no update path from version "2.4.5" to version "2.5.1"
My PostgreSQL version is 11.1
Related
I would like to use the jupyterlab-nvdashboard to monitor the GPU performance from JupyterLab. Although it is not mentioned in the github, I found the extension is also available in the conda-forge channel and I installed it from there.
conda install -c conda-forge jupyterlab-nvdashboard
The installation went without errors and the last environment list entry shows that jupyterlab-nvdashboard-0.6.0 was installed together with the dependency pynvml-11.0.0:
2021-10-21 12:15:21 (rev 8)
+jupyterlab-nvdashboard-0.6.0 (conda-forge/noarch)
+pynvml-11.0.0 (conda-forge/noarch)
I am running a recent version of jupyter-lab >= 3.0
$ jupyter --version
Selected Jupyter core packages...
IPython : 7.28.0
ipykernel : 6.4.1
ipywidgets : not installed
jupyter_client : 7.0.6
jupyter_core : 4.8.1
jupyter_server : 1.11.1
jupyterlab : 3.1.18
This is the error I am getting when I tried to install the labextension.
$ jupyter labextension install jupyterlab-nvdashboard
An error occurred.
ValueError: The extension "jupyterlab-nvdashboard" does not yet support the current version of JupyterLab.
Conflicting Dependencies:
JupyterLab Extension Package
>=3.1.17 <3.2.0 >=2.0.0 <3.0.0 #jupyterlab/application
>=3.1.17 <3.2.0 >=2.0.0 <3.0.0 #jupyterlab/apputils
>=5.1.17 <5.2.0 >=4.0.0 <5.0.0 #jupyterlab/coreutils
>=17.0.1 <18.0.0 >=16.4.2 <17.0.0 react
>=17.0.1 <18.0.0 >=16.9.0 <17.0.0 react-dom
And this is the output of the server extension list command:
$ jupyter server extension list
Config dir: /home/<username>/.jupyter
Config dir: /home/<username>/anaconda3/envs/test/etc/jupyter
dask_labextension enabled
- Validating dask_labextension...
dask_labextension 5.1.0 OK
jupyter_server_proxy enabled
- Validating jupyter_server_proxy...
jupyter_server_proxy OK
jupyterlab enabled
- Validating jupyterlab...
jupyterlab 3.1.18 OK
jupyterlab_nvdashboard enabled
- Validating jupyterlab_nvdashboard...
X validation failed
I realized the dashboard works inside JupyterLab despite jupyter labextension telling me the X validation failed. So all good. =)
I have a laravel project and I tried to run phpunit to give me a coverage report. I ran the command vendor/bin/phpunit --coverage-html storage/test-output-data/coverage-html and it gave the output:
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.
Error: No code coverage driver is available
I tried to resolve this situation by doing a sudo pecl install pcov, but running the phpunit still gave the same error above.
I noticed that I have the file /usr/lib/php/20170718/pcov.so. So I added the line extension=/usr/lib/php/20170718/pcov.so to my /etc/php/7.4/cli/php.ini file. But when I type php -v, I get this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20170718/pcov.so' (tried: /usr/lib/php/20170718/pcov.so (/usr/lib/php/20170718/pcov.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so (/usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.11 (cli) (built: Oct 10 2020 19:44:50) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies
I also have a folder called /usr/lib/php/20190902 but it does not have a pcov.so file.
I also tried doing a sudo pecl install xdebug, but I run into similar errors as above where phpunit says there's no driver and typing php -v says some global variable is missing similar to the pcov issue.
What am I doing wrong?
I noticed that I have the file /usr/lib/php/20170718/pcov.so. So I added the line extension=/usr/lib/php/20170718/pcov.so to my /etc/php/7.4/cli/php.ini file.
This file is for PHP 7.2 (based on 20170718 part) while you are trying to use it in PHP 7.4.
You need to get the right version of Xdebug (or PCOV) for your PHP 7.4. (NOTE: for PHP 7.4 the API version (and the right folder in the path) will be 20190902.)
Try this solution from the following answer to switch / install extensions via PECL for specific PHP version (7.4 instead of your current 7.2): https://stackoverflow.com/a/54594604/783119
sudo pecl -d php_suffix=7.4 install <package-name>
This has nothing to do with PHPUnit. You have a problem with your PHP environment: "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20170718/pcov.so' (tried: /usr/lib/php/20170718/pcov.so (/usr/lib/php/20170718/pcov.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so (/usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0"
You just need to install xdebug, so the coverage knows how to run.
For example, for PHP 7.1, it's this package:
sudo apt install php7.1-xdebug
Just fixed it today for my scenario. In your case, just change the PHP version to:
sudo apt install php7.4-xdebug
I had to brew reinstall some things that my existing project uses.
Now I'm getting this error when I'm running a SELECT statement:
Interactive Elixir (1.7.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
18:07:23.636 [debug] QUERY ERROR source="shops" db=5.4ms
SELECT s0."id", s0."name", s0."place_id", s0."point", s0."inserted_at", s0."updated_at",ST_Distance_Sphere(s0."point", ST_SetSRID(ST_MakePoint($1,$2), $3)) FROM "shops" AS s0 WHERE (ST_DWithin(s0."point"::geography, ST_SetSRID(ST_MakePoint($4, $5), $6), $7)) ORDER BY s0."point" <-> ST_SetSRID(ST_MakePoint($8,$9), $10) [176.1666197, -37.6741546, 4326, 176.1666197, -37.6741546, 4326, 2000, 176.1666197, -37.6741546, 4326]
18:07:23.666 [error] #PID<0.356.0> running Api.Router terminated
Server: 192.168.20.9:4000 (http)
Request: GET /products?categories[]=1&categories[]=2&categories[]=3&categories[]=4&categories[]=5&categories[]=6&categories[]=7&categories[]=8&categories[]=9&categories[]=10&categories[]=11&categories[]=12&categories[]=13&categories[]=14&categories[]=15&categories[]=16&categories[]=17&categories[]=18&categories[]=19&categories[]=20&categories[]=21&categories[]=22&categories[]=23&categories[]=24&categories[]=25&keyword=%22%22&latitude=-37.6741546&longitude=176.1666197&distanceFromLocationValue=2&distanceFromLocationUnit=%22kilometers%22
** (exit) an exception was raised:
** (Postgrex.Error) ERROR 58P01 (undefined_file): could not access file "$libdir/postgis-2.4": No such file or directory
(ecto) lib/ecto/adapters/sql.ex:436: Ecto.Adapters.SQL.execute_and_cache/7
(ecto) lib/ecto/repo/queryable.ex:130: Ecto.Repo.Queryable.execute/5
(ecto) lib/ecto/repo/queryable.ex:35: Ecto.Repo.Queryable.all/4
(api) lib/api/controllers/product/get_product.ex:46: Api.Controllers.GetProduct.get_products/1
(api) lib/api/router.ex:1: Api.Router.plug_builder_call/2
(api) lib/plug/debugger.ex:123: Api.Router.call/2
(plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) /Users/Ben/Development/Projects/vepo/api/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
It is complaining about PostGis. I did brew install postgis to install it again. Still getting the error. Where is $libdirdirectory in my macbook so that I can view the files? How do I fix this error?
The issue was that my versions of postGis and postgresql were incompatible (I had used brew install xxx to get them both).
So I just uninstalled all postgresql and postgis versions from my computer: brew uninstall postgresql and brew uninstall postgis
brew list still listed one version of postgresql:
postgresql9.4
So I uninstalled that version:
brew uninstall postgresql9.4
Then I used postgres.app downloads to download and install postgresql and postgis, because it gets them both together and they are always compatible.
I specifically went for the "Legacy Postgres.app with PostgreSQL 10" download because that is what I was using all through my development on this app.
Use instructions at https://postgresapp.com/ to install it after it is downloaded.
Am getting the following error - Missing required dependencies ['numpy']
Standalone and via Django, without Apache2 integration - the code work likes charm, however things start to fall when used with Apache2. It refuses to import pandas or numpy giving one error after another.
I am using Apache2, libapache2-mod-wsgi-py3, Python 3.5 and Anaconda 2.3.0
Request Method: GET
Request URL: http://127.0.0.1/api/users/0/
Django Version: 1.10.5
Exception Type: ImportError
Exception Value:
Missing required dependencies ['numpy']
Exception Location: /home/fractaluser/anaconda3/lib/python3.4/site-packages/pandas/__init__.py in <module>, line 18
Python Executable: /usr/bin/python3
Python Version: 3.5.2
Python Path:
['/home/fractaluser/anaconda3/lib/python3.4/site-packages',
'/home/fractaluser/anaconda3/lib/python3.4/site-packages/Sphinx-1.3.1-py3.4.egg',
'/home/fractaluser/anaconda3/lib/python3.4/site-packages/setuptools-27.2.0-py3.4.egg',
'/usr/lib/python35.zip',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-x86_64-linux-gnu',
'/usr/lib/python3.5/lib-dynload',
'/usr/local/lib/python3.5/dist-packages',
'/usr/lib/python3/dist-packages',
'/var/www/html/cgmvp']
Server time: Fri, 9 Jun 2017 11:12:37 +0000
You can't force mod_wsgi built with the system Python version to use a Python virtual environment built for a different Python version, nor different Python installation. That is what it appears you are doing. You would need to uninstall mod_wsgi and install it from source code, compiling it against the Anaconda Python distribution. Best to use the pip install method and follow steps to integrate it into existing Apache installation. See:
https://pypi.python.org/pypi/mod_wsgi
Also see the following documentation for setting up a Python virtual environment with mod_wsgi, as it appears you aren't doing that in the recommended way either.
http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
First task though is to reinstall mod_wsgi.
I had the same problem using apache2 with mod_wsgi python 3.6 envinronmet 64, the version numpy used was 1.13, only change the version with previous and worked !!.
pip3 install numpy==1.12
When I am in my postgres db and tried to create an extension for my db, I get this error
ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory
I know there are so many posts out there with this error and solutions and I tried them all too. Found so much in stackoverflow but none of them worked.
I realized in my postgresql directory there are 9.2, 9.3, 9.4, 9.5, 9.6,
I went into the directory in the error and I realized there is really no postgis.control inside 9.5
I checked my psql version and showed 9.6.1
I went into 9.6 folder and I DO see a postgis.control in it.
I want to changed the installation directory so when i run
create extension postgis
it would go
"/usr/share/postgresql/9.6/extension/postgis.control"
instead of
"/usr/share/postgresql/9.5/extension/postgis.control"
Can someone please give me a hand?
Thanks in advance.
P.S. Using Ubuntu 14.04 and also have Ubuntu 16.04 as desktop which I haven't try to install postgis yet
You should use the following command:
sudo apt-get install postgresql-9.6-postgis-scripts
Use the following command to get the postgis.control in your 9.5 version directory:
sudo apt install postgis postgresql-9.5-postgis-2.3