SequelizeDatabaseError:当我在centos上安装了JSON-C时,你需要JSON-C用于ST_GeomFromGeoJSON

时间:2016-05-28 15:28:20

标签: 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

1 个答案:

答案 0 :(得分:0)

这恰好是一个postgis问题,我最终从源代码构建我的postgis。我必须使用以下命令配置我的postgis:

./configure --with-jsonc=/usr/include

如果您愿意,可以在我的博客上查看我的完整步骤/命令日志: http://www.sadafnoor.com/blog/centos-postgis-setup-you-need-json-c-for-st_geomfromgeojson/