GDAL/OGR2OGR/OGRINFO每次运行时都会产生无效的指针错误

发布于 2025-01-31 12:00:05 字数 794 浏览 3 评论 0 原文

在按照此处描述的步骤安装OGR2OGR之后

当我运行ogr2ogr或ogrinfo时,我会收到以下错误消息

free():无效的指针

执行命令后无效指针。有什么建议要清洁吗?

ogrinfo- version GDAL 3.3.2,发行2021/09/01 Free():无效指针 中止(核心倾倒)

- 编辑 -

我可能在这里找到了某种提示。 mail-archive.com/< a href =“/cdn-cgi/l/email-pretection“ class =” __ cf_email__ __ clate-c.email__' Proj

摘录:

因此,您的GDAL正在针对2个Proj版本libproj.so.15和libproj.so.19链接。确保您的libspatialite和libgeotiff版本来自ubuntugis ppa,因此它们链接了libproj.so.so.19和no .so.15

现在我需要找到一种方法来删除一个库,而不会破坏我的操作系统...

After installing ogr2ogr following the steps described here
https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html

When I run either ogr2ogr or ogrinfo, I get the following error message

free(): invalid pointer

AFTER the execution of the command. Any advice to clean that?

ogrinfo --version
GDAL 3.3.2, released 2021/09/01
free(): invalid pointer
Aborted (core dumped)

-- Edit --

I may have found some kind of tip here.
mail-archive.com/[email protected]/msg36151.htmllibproj

Excerpt :

so your GDAL is linking against 2 PROJ versions libproj.so.15 and libproj.so.19. Make sure your libspatialite and libgeotiff versions are from the ubuntugis PPA, so they link gainst libproj.so.19 and no .so.15

Now I need to find a way to remove one library, without breaking my os...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝咒 2025-02-07 12:00:05

链接到2个proj版本libproj.so.15和libproj.so.so.19有一个

错误

sudo apt purge gdal-bin -y
sudo rm -f /lib/x86_64-linux-gnu/libproj.so.15
sudo ln -s /lib/x86_64-linux-gnu/libproj.so.19 /lib/x86_64-linux-gnu/libproj.so.15
sudo apt install gdal-bin -y

There's a bug regarding linking against 2 PROJ versions libproj.so.15 and libproj.so.19

For Debian/Ubuntu, you can do to remedy it

sudo apt purge gdal-bin -y
sudo rm -f /lib/x86_64-linux-gnu/libproj.so.15
sudo ln -s /lib/x86_64-linux-gnu/libproj.so.19 /lib/x86_64-linux-gnu/libproj.so.15
sudo apt install gdal-bin -y
人海汹涌 2025-02-07 12:00:05

我有Ubuntu 20.04.6 LTS(WSL2)。
同样的问题。

挑战是找到与您的GDAL和PDAL一起使用的合适的Libproj版本。我尝试了许多不同的变体。这是我自己的软件包,最终消除了错误消息。

# 1st remove all
sudo apt-get purge gdal-bin libgdal-dev libgd-gd2-perl 
sudo apt-get purge python3-gdal gdal-data libgdal29 libpdal-base12   -y
sudo apt-get purge proj-bin libproj-dev proj-data -y
sudo apt-get purge pdal libpdal-plugins -y
sudo apt autoremove -y
# check /lib/x86_64-linux-gnu/libproj*  - remove those

proj build from源,从构建中安装的proj。
如何在Ubuntu建造:
https://neaccsu.net/posts/proj_install/proj_install/

  • -libproj*
  • 我现在有libproj.so.25.9.6.0
#set source, try to install latest versions - test 1st ppa
#sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update

# then re-install all
sudo apt-get install gdal-bin libgdal-dev gdal-data -y
sudo apt-get install libgd-gd2-perl python3-gdal libgdal29 -y
# those install all needed 

然后测试

ogrinfo --version
pdal --version
gdalinfo --version

是否
获取免费():无效的指针
流产

然后需要修复libproj软链接。

cd /lib/x86_64-linux-gnu
# I removed all libproj.so*
# then some softlink to the /usr/local/lib/libproj.so.25.9.6.0
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.25
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.22
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.19
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.15

之后WAU。只花了几个小时。同样不错的结果 pdal - version gdalinfo -version

I have Ubuntu 20.04.6 LTS (WSL2).
Same problem.

The challenge is finding the right libproj version that works with your both Gdal and Pdal. I tried many different variations. Here is my own package that ultimately eliminated the error message.

# 1st remove all
sudo apt-get purge gdal-bin libgdal-dev libgd-gd2-perl 
sudo apt-get purge python3-gdal gdal-data libgdal29 libpdal-base12   -y
sudo apt-get purge proj-bin libproj-dev proj-data -y
sudo apt-get purge pdal libpdal-plugins -y
sudo apt autoremove -y
# check /lib/x86_64-linux-gnu/libproj*  - remove those

PROJ build from source, PROJ installed from build.
How to build in Ubuntu:
https://neacsu.net/posts/proj_install/

  • lib directory is /usr/local/lib - libproj*
  • I have now libproj.so.25.9.6.0
#set source, try to install latest versions - test 1st ppa
#sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update

# then re-install all
sudo apt-get install gdal-bin libgdal-dev gdal-data -y
sudo apt-get install libgd-gd2-perl python3-gdal libgdal29 -y
# those install all needed 

Then test

ogrinfo --version
pdal --version
gdalinfo --version

If
get free(): invalid pointer
Aborted

then need fix the libproj soft links.

cd /lib/x86_64-linux-gnu
# I removed all libproj.so*
# then some softlink to the /usr/local/lib/libproj.so.25.9.6.0
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.25
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.22
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.19
sudo ln -s /usr/local/lib/libproj.so.25.9.6.0 libproj.so.15

And after all this ogrinfo --version no ERROR. Wau. It took only some hours. Also nice result pdal --version and gdalinfo --version

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文