1

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?.

Lii
  • 11,553
  • 8
  • 64
  • 88
  • what are you trying to do exactly? The reason you are failing is that `$ydb_dist/ydb` command does a lot of work to set-up an environment using defaults, whereas `$ydb_dist/yottadb` calls yottadb directly without setting up an environment. – Sam Habiel Sep 30 '21 at 15:26

1 Answers1

2

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...

Jens
  • 206
  • 1
  • 3
  • So basically you installed YottaDB and then you established a new environment, right?. – Luciano Muratore Sep 29 '21 at 07:30
  • You did all of that in libicu-dev. I don't know what libicu-dev is. Can I use it in Ubuntu?. So, I wonder if I have to uninstall YottaDB, then install libicu-dev and later reinstall YottaDB. – Luciano Muratore Sep 29 '21 at 07:36
  • libicu is used when you operate yottadb in UTF-8 Mode. I tried it on Raspbian, but it should work on Ubuntu too. If you don't care about foreign Characters you can use M Mode and don't need libicu. then just have to do "export ydb_chset='M'". I'm not sure if you really need a new installation. Just try if you get error messages. – Jens Sep 29 '21 at 14:29