Cannot access global directory

245 views Asked by At

Dears,

I have the following issue:

I have defined the Global Directory in shell as follows:

$ydb_gbldir=memory.gld

$export ydb_gbldir.

When I try to do it in the shell $ydb to access the YottaDB Application, I get the following error:

Error file is at /tmp/ydb_env_3163_9e7vEJ/err 150374122,Robustify+10^%YDBENV,%YDB-E-ZGBLDIRACC, Cannot access global directory /home/test/memory.gld. Cannot continue.,%SYSTEM-E-ENO2, No such file or direct ory $ZSTATUS="150374122,Robustify+10^%YDBENV,%YDB-E-ZGBLDIRACC, Cannot access global directory /home/test/memory.gld. Cannot continue.,%SYSTEM-E-ENO2, No such file or directory" /usr/local/lib/yottadb/r132/ydb: 19: /yottadb: not found

Can somebody explain what I did wrong with the $ydb_gbldir configuration that now I cannot access the app?.

2

There are 2 answers

3
Jens On

I've posted an explanation how to create a working m installation a time ago. maybe it helps you. Following commands have to be performed as root to save several sudos:

 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 

Please say if it works for you...

0
K.S. Bhaskar On

These days, it is much simpler. Install YottaDB using the ydbinstall.sh script as described in the Get Started page. Then source /usr/local/etc/ydb_env_set to use YottaDB in $HOME/.yottadb. If the environment variable ydb_dir is set, YottaDB will use $ydb_dir.