gpt4 book ai didi

安装后立即出现 php libcouchbase 异常

转载 作者:搜寻专家 更新时间:2023-10-31 20:43:37 26 4
gpt4 key购买 nike

我已经在 ubuntu 上安装了 couchbase:

$ php -i | grep couchbase
Additional .ini files parsed => /etc/php5/cli/conf.d/couchbase.ini,
couchbase
couchbase support => enabled
libcouchbase version => 2.0.5
couchbase.compression_factor => 1.3 => 1.3
couchbase.compression_threshold => 2000 => 2000
couchbase.compressor => none => none
couchbase.config_cache => no value => no value
couchbase.durability_default_poll_interval => 100000 => 100000
couchbase.durability_default_timeout => 40000000 => 40000000
couchbase.instance.persistent => On => On
couchbase.restflush => On => On
couchbase.serializer => php => php
couchbase.view_timeout => 75 => 75

我也这样做过:

$ locate libevent.so
/opt/couchbase/lib/libevent.so
$ export DYLD_LIBRARY_PATH=/opt/couchbase/lib
$ echo $DYLD_LIBRARY_PATH
/opt/couchbase/lib

所以现在我尝试运行以下脚本:

#!/usr/bin/php
<?php
$cb = new Couchbase("127.0.0.1:8091", "", "", "default");
$cb->set("a", 101);
var_dump($cb->get("a"));
?>

但我收到以下错误:

PHP Fatal error:  Uncaught exception 'CouchbaseLibcouchbaseException' with message 'Failed to create libcouchbase instance' in /tmp/test.php:3

我该如何解决这个问题?

最佳答案

我采纳了埃迪的建议并使用 apt 重新安装。现在一切正常:

sudo wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list
wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install libcouchbase{2,-dev,-dbg}

关于安装后立即出现 php libcouchbase 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16271310/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com