当我尝试在CentOS服务器中安装新安装的python2.7的readline模块时,有人可以帮助我解决gcc的问题吗?
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER - DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES - DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/usr/local/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o -Wno-strict-prototypes
gcc -pthread -shared build/temp.linux-x86_64-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-2.7/readline.so
gcc: readline/libreadline.a: No such file or directory
gcc: readline/libhistory.a: No such file or directory
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
非常感谢!
有谁遇到过这种情况?
当我试图运行在Xcode6Beta中完成的应用程序时,它一直显示:
2014-07-14 00:28:48.131 WeightLogger2 [1866:32214]无法找到支持键盘iPhone-Portrait-DecimalPad的8型键盘; 使用2617181025_Portrait_iPhone-Simple-Pad_Default
从快递4开始,你不应该这样做
require('./app/routes.js')(app, passport); // load our routes and pass in our app and fully configured passport
module.exports = function(app, passport) {
// =====================================
// FACEBOOK ROUTES =====================
// =====================================
// route for facebook authentication and login
app.get('/auth/facebook', passport.authenticate('facebook', { scope : 'email' }));
// handle the callback after facebook has authenticated the user
app.get('/auth/facebook/callback',
passport.authenticate('facebook', {
successRedirect : '/profile',
failureRedirect : '/'
}));
// route for logging out
app.get('/logout', function(req, res) {
req.logout();
res.redirect('/');
});
};
Run Code Online (Sandbox Code Playgroud)
相反,你应该使用express.Route()函数和
var …Run Code Online (Sandbox Code Playgroud) 我正在使用 NSURLSession 默认会话使用以下代码
var defaultSession : NSURLSession {
var config = NSURLSessionConfiguration.defaultSessionConfiguration()
config.HTTPAdditionalHeaders = [
// FIXME: for POST this line doesn't work, but for PUT it works, this could be a bug.
"Content-Type": "application/json"
]
return NSURLSession(configuration: config, delegate: self.delegate, delegateQueue: NSOperationQueue.mainQueue())
}
Run Code Online (Sandbox Code Playgroud)
但似乎 content-type: application/json 设置仅适用于 PUT 方法,这是服务器响应
POST application/x-www-form-urlencoded /api/v2/DevHiin 400 24.815 ms - 11
PUT application/json /api/v2/DevBoost 201 51.151 ms - 65
Run Code Online (Sandbox Code Playgroud)
当我为每个 POST 请求添加标头设置时,它会再次起作用。
req.addValue("application/json", forHTTPHeaderField: "Content-Type")
Run Code Online (Sandbox Code Playgroud)
服务器
POST application/json /api/v2/DevHiin 201 19.925 ms - …Run Code Online (Sandbox Code Playgroud) centos ×1
express-4 ×1
gcc ×1
ios ×1
node.js ×1
nsurlsession ×1
passport.js ×1
python ×1
swift ×1
xcode6 ×1