无法写入URI文件/var/run/couchdb/couch.uri:没有这样的文件或目录

时间:2017-05-31 03:36:44

标签: couchdb

当我打算使用命令public string replaceString(string value) { string newValue; string findValue; string replaceValue; findValue = textBox1.Text; replaceValue = textBox2.Text; if(value.StartsWith(findValue)) newValue = value.Replace(findValue, replaceValue); else newValue = value; return newValue; } 启动couchdb时收到以下错误:

sudo couchdb start

然后我必须手动运行以下命令来解决错误:

me@linux-box:~> sudo couchdb start
Apache CouchDB 1.6.1 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.33.0>] Apache CouchDB has started on http://0.0.0.0:5984/
[error] [<0.33.0>] Failed to write to URI file /var/run/couchdb/couch.uri: no such file or directory
[error] [<0.32.0>] {error_report,<0.32.0>,
                    {<0.32.0>,crash_report,
                     [[{initial_call,
                        {application_master,init,
                         ['Argument__1','Argument__2','Argument__3',
                          'Argument__4']}},
                       {pid,<0.32.0>},
                       {registered_name,[]},
                       {error_info,
                        {exit,
                         {enoent,
                          {couch_app,start,
                           [normal,
                            ["/etc/couchdb/default.ini",
                             "/etc/couchdb/local.ini"]]}},
                         [{application_master,init,4,
                           [{file,"application_master.erl"},{line,134}]},
                          {proc_lib,init_p_do_apply,3,
                           [{file,"proc_lib.erl"},{line,240}]}]}},
                       {ancestors,[<0.31.0>]},
                       {messages,[{'EXIT',<0.33.0>,normal}]},
                       {links,[<0.31.0>,<0.7.0>]},
                       {dictionary,[]},
                       {trap_exit,true},
                       {status,running},
                       {heap_size,987},
                       {stack_size,27},
                       {reductions,153}],
                      []]}}
{"init terminating in do_boot",{{badmatch,{error,{enoent,{couch_app,start,[normal,["/etc/couchdb/default.ini","/etc/couchdb/local.ini"]]}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
init terminating in do_boot ()

现在我想知道如何永久地解决错误。我觉得我可能要修改couchdb的配置,但我不确定如何。感谢。

1 个答案:

答案 0 :(得分:1)

我把它放在〜/ .bashrc中(sudo couchdb start位除外)。

有点沉重,但无论如何都可以。