liambaba 2015-02-18 10:00 采纳率: 0%
浏览 9739

ghost 博客搭建遇到问题

环境:
系统: debian 7.8 php apache mysql
描述: 默认的是sqlite3 报错,我准备用 mysql 连接ghost

修改ghost 文件下config.js
production: {
url: 'http://blog.koubeidai.com',
mail: {},
database: {
client: 'mysql',
connection: {
host : 'localhost',
user : '',
password : '',
database : 'ghost',
charset : 'utf8'
},
debug: false
},

    server: {
        // Host to be passed to node's `net.Server#listen()`
        host: '127.0.0.1',
        // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
        port: '2368'
    }
},

在ghost文件夹下输入: npm install --production(卡在这一步了)

sqlite3@3.0.4 install /home/bags/ghost/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory /home/bags/ghost/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3080701/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3080701/sqlite3.o
AR(target) Release/obj.target/deps/sqlite3.a
COPY Release/sqlite3.a
CXX(target) Release/obj.target/node_sqlite3/src/database.o
../src/database.cc: In static member function 'static void node_sqlite3::Database::New(const v8::FunctionCallbackInfo<v8::Value>&)':
../src/database.cc:134:71: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>, v8::PropertyAttribute)'
../src/database.cc:134:71: note: candidates are:
In file included from /root/.node-gyp/0.12.0/src/node.h:61:0,
from ../src/database.cc:2:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: bool v8::Object::Set(v8::Handle<v8::Value>, v8::Handle<v8::Value>)
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate expects 2 arguments, 3 provided
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: bool v8::Object::Set(uint32_t, v8::Handle<v8::Value>)
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate expects 2 arguments, 3 provided
../src/database.cc:135:69: error: no matching function for call to 'v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::Integer>, v8::PropertyAttribute)'
../src/database.cc:135:69: note: candidates are:
In file included from /root/.node-gyp/0.12.0/src/node.h:61:0,
from ../src/database.cc:2:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: bool v8::Object::Set(v8::Handle<v8::Value>, v8::Handle<v8::Value>)
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2112:8: note: candidate expects 2 arguments, 3 provided
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: bool v8::Object::Set(uint32_t, v8::Handle<v8::Value>)
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2114:8: note: candidate expects 2 arguments, 3 provided
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginOpen(node_sqlite3::Database::Baton*)':
../src/database.cc:145:9: warning: unused variable 'status' [-Wunused-variable]
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginClose(node_sqlite3::Database::Baton*)':
../src/database.cc:230:9: warning: unused variable 'status' [-Wunused-variable]
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginExec(node_sqlite3::Database::Baton*)':
../src/database.cc:509:9: warning: unused variable 'status' [-Wunused-variable]
../src/database.cc: In static member function 'static void node_sqlite3::Database::Work_BeginLoadExtension(node_sqlite3::Database::Baton*)':
../src/database.cc:610:9: warning: unused variable 'status' [-Wunused-variable]
make: *** [Release/obj.target/node_sqlite3/src/database.o] 错误 1
make: Leaving directory
/home/bags/ghost/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.2.0-4-amd64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--name=sqlite3" "--configuration=Release" "--module_name=node_sqlite3" "--version=3.0.4" "--major=3" "--patch=4" "--runtime=node" "--node_abi=node-v14" "--platform=linux" "--target_platform=linux" "--arch=x64" "--target_arch=x64" "--module_main=./lib/sqlite3" "--host=https://mapbox-node-binary.s3.amazonaws.com/" "--module_path=/home/bags/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64" "--module=/home/bags/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node" "--remote_path=./sqlite3/v3.0.4/" "--package_name=node-v14-linux-x64.tar.gz" "--staged_tarball=build/stage/sqlite3/v3.0.4/node-v14-linux-x64.tar.gz" "--hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/" "--hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/node-v14-linux-x64.tar.gz"
gyp ERR! cwd /home/bags/ghost/node_modules/sqlite3
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=3.0.4 --major=3 --patch=4 --runtime=node --node_abi=node-v14 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://mapbox-node-binary.s3.amazonaws.com/ --module_path=/home/bags/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64 --module=/home/bags/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node --remote_path=./sqlite3/v3.0.4/ --package_name=node-v14-linux-x64.tar.gz --staged_tarball=build/stage/sqlite3/v3.0.4/node-v14-linux-x64.tar.gz --hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/ --hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/node-v14-linux-x64.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/bags/ghost/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:76:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1008:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
node-pre-gyp ERR! System Linux 3.2.0-4-amd64
node-pre-gyp ERR! command "node" "/home/bags/ghost/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/bags/ghost/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.1
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=3.0.4 --major=3 --patch=4 --runtime=node --node_abi=node-v14 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://mapbox-node-binary.s3.amazonaws.com/ --module_path=/home/bags/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64 --module=/home/bags/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node --remote_path=./sqlite3/v3.0.4/ --package_name=node-v14-linux-x64.tar.gz --staged_tarball=build/stage/sqlite3/v3.0.4/node-v14-linux-x64.tar.gz --hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/ --hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/node-v14-linux-x64.tar.gz' (1)
npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! sqlite3@3.0.4 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.0.4 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/bags/ghost/npm-debug.log

这个应该如何解决?

  • 写回答

3条回答 默认 最新

  • threenewbee 2015-02-18 14:03
    关注

    尝试先执行下npm owner ls sqlite3

    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序