【问题标题】:YottaDB. Cannot access global directory约塔数据库。无法访问全局目录
【发布时间】:2021-09-27 10:00:42
【问题描述】:

亲爱的,

我有以下问题:

我在 shell 中定义了全局目录如下:

$ydb_gbldir=memory.gld

$export ydb_gbldir.

当我尝试在 shell $ydb 中访问 YottaDB 应用程序时,我收到以下错误:

错误文件位于 /tmp/ydb_env_3163_9e7vEJ/err 150374122,Robustify+10^%YDBENV,%YDB-E-ZGBLDIRACC, 无法访问全局目录 /home/test/memory.gld。无法继续。,%SYSTEM-E-ENO2, 没有这样的文件或目录 $ZSTATUS="150374122,Robustify+10^%YDBENV,%YDB-E-ZGBLDIRACC, 无法访问全局目录 /home/test/memory.gld。无法继续。,%SYSTEM-E-ENO2, 没有这样的文件或目录" /usr/local/lib/yottadb/r132/ydb: 19: /yottadb: 未找到

谁能解释我在$ydb_gbldir 配置上做错了什么,现在我无法访问应用程序?

【问题讨论】:

  • 你到底想做什么?您失败的原因是 $ydb_dist/ydb 命令在使用默认值设置环境方面做了很多工作,而 $ydb_dist/yottadb 直接调用 yottadb 而不设置环境。

标签: linux database mumps


【解决方案1】:

我之前已经发布了关于如何创建工作 m 安装的说明。 也许它可以帮助你。必须以 root 身份执行以下命令才能保存多个 sudo:

 apt install libicu-dev (needed for UTF-8 support)
    
    mkdir /tmp/tmp ; wget -P /tmp/tmp https://gitlab.com/YottaDB/DB/YDB/raw/master/sr_unix/ydbinstall.sh
    cd /tmp/tmp ; chmod +x ydbinstall.sh
    ./ydbinstall.sh --utf8 default --verbose r1.28
    mkdir /var/lib/yottadb
    mkdir /var/lib/yottadb/r
    mkdir /var/lib/yottadb/g
    mkdir /var/lib/yottadb/o
    chmod 775 -R /var/lib/yottadb
    groupadd yottadb
    chgrp yottadb -R /var/lib/yottadb/
    usermod -aG yottadb <username>
    
    I put the following commands at the end of /etc/bash.bashrc
    
    export ydb_dist=/usr/local/lib/yottadb/r128
    export PATH=$PATH:$ydb_dist
    export ydb_gbldir=/var/lib/yottadb/g/gtm.gld
    export ydb_routines="/var/lib/yottadb/o(/var/lib/yottadb/r) /usr/local/lib/yottadb/r128/utf8/libyottadbutil.so"
    export ydb_ztrap_form="adaptive"
    export ydb_chset="UTF-8"
    export ydb_icu_version=`pkg-config --modversion icu-io`
    export gtm_icu_version=$ydb_icu_version
    alias m="\$ydb_dist/mumps -di"
    alias M="\$ydb_dist/mumps -di"
    alias gde="\$ydb_dist/mumps -run GDE"
    
    
    I've added a yottadb-group to restrict directory access to users in that group
    
    After this a reboot is necessary beacuse the new group is not active until reboot as I had to learn. Also the bash.bashrc is in effect then
    
    next step is to create the global directory
    
    $ gde
    GDE> change -seg default -file=/var/lib/yottadb/g/mumps.dat
    GDE> exit
    $ mupip create
    
    now I have a full working YottaDB environment.
    
    A Hello World Example would be:
    
    nano /var/lib/yottadb/r/helloworld.m
    
    HelloWorld ;
    W "Hello World!"
    Q
    
    back on shell:
    $ mumps -r helloworld
    
    Mumps Commandline can be reached by
    
    $ m 

请说出它是否适合你...

【讨论】:

  • 所以基本上你安装了YottaDB,然后你建立了一个新环境,对吧?
  • 您在 libicu-dev 中完成了所有这些工作。我不知道 libicu-dev 是什么。我可以在 Ubuntu 中使用它吗?所以,我想知道我是否必须卸载 YottaDB,然后安装 libicu-dev,然后重新安装 YottaDB。
  • 在 UTF-8 模式下操作 yottadb 时使用 libicu。我在 Raspbian 上试过,但它也应该在 Ubuntu 上工作。如果您不关心外国角色,您可以使用 M 模式并且不需要 libicu。然后只需要执行“export ydb_chset='M'”。我不确定您是否真的需要新安装。如果您收到错误消息,请尝试。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-22
  • 2017-11-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-26
相关资源
最近更新 更多