javascript - SequelizeDatabaseError : You need JSON-C for ST_GeomFromGeoJSON when I have JSON-C installed on centos

标签 javascript node.js centos sequelize.js

我的 centos 服务器出现以下错误:

npm-2 Unhandled rejection SequelizeDatabaseError: You need JSON-C for ST_GeomFromGeoJSON
npm-2     at Query.formatError (/home/centos/jobcue.com/node_modules/sequelize/lib/dialects/postgres/query.js:357:14)
npm-2     at null.<anonymous> (/home/centos/jobcue.com/node_modules/sequelize/lib/dialects/postgres/query.js:88:19)
npm-2     at emitOne (events.js:77:13)
npm-2     at emit (events.js:169:7)
npm-2     at Query.handleError (/home/centos/jobcue.com/node_modules/pg/lib/query.js:108:8)
npm-2     at null.<anonymous> (/home/centos/jobcue.com/node_modules/pg/lib/client.js:171:26)
npm-2     at emitOne (events.js:77:13)
npm-2     at emit (events.js:169:7)
npm-2     at Socket.<anonymous> (/home/centos/jobcue.com/node_modules/pg/lib/connection.js:109:12)
npm-2     at emitOne (events.js:77:13)
npm-2     at Socket.emit (events.js:169:7)
npm-2     at readableAddChunk (_stream_readable.js:153:18)
npm-2     at Socket.Readable.push (_stream_readable.js:111:10)
npm-2     at TCP.onread (net.js:531:20)

当我尝试在服务器上安装 json-c 时:
sudo yum install json-c
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.eecs.wsu.edu
 * epel: s3-mirror-us-west-2.fedoraproject.org
 * extras: linux.mirrors.es.net
 * updates: mirror.raystedman.net
Package json-c-0.11-4.el7_0.x86_64 already installed and latest version
Nothing to do

最佳答案

这恰好是一个 postgis 问题,我最终从源代码构建了我的 postgis。我必须使用以下命令配置我的 postgis:
./configure --with-jsonc=/usr/include
如果您愿意,可以在我的博客上查看我的完整步骤/命令日志:
http://www.sadafnoor.com/blog/centos-postgis-setup-you-need-json-c-for-st_geomfromgeojson/

关于javascript - SequelizeDatabaseError : You need JSON-C for ST_GeomFromGeoJSON when I have JSON-C installed on centos,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37500821/

相关文章:

javascript - 将 .htc 文件的内容转换为 'regular' Javascript

用于隐藏/显示 div 的 Javascript if/else 语句

node.js - 在一个变量上运行的 Node JS 中使用正则表达式的 Mongo 查询

amazon-web-services - 权限被拒绝(公钥、gssapi-keyex、gssapi-with-mic) - AWS

docker - 容器的 Rancher 静态 IP

javascript - 将业务对象序列化为 JSON

javascript - 根据指定的数据属性创建一个带有值和文本的选择下拉选项

node.js - 为什么node.js从0.12.x版本直接升级到4.0.0?

javascript - 来自 API 的 2 个并发请求数据混淆

linux - CentOS RPM 打包是否支持或依赖 Requires 字段?