Can't locate Ora2Pg/PLSQL.pm in #INC - postgresql

I am trying to run Ora2pg and get the below error. I've even copied the PLSQL.pm file under $PERL5LIB directory but it's not picking up from there.
postgres#:/var/lib/pgsql/ora2pg/ora2pg-20.0/scripts
$ ./ora2pg --project_base $HOME/Phycon_o2p --init_project oracle_service_name
Can't locate Ora2Pg/PLSQL.pm in #INC (#INC contains: /var/lib/pgsql/PERL_DBI_DBD/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /var/lib/pgsql/PERL_DBI_DBD/lib64/perl5/Ora2Pg.pm line 1390.
postgres#:/var/lib/pgsql/ora2pg/ora2pg-20.0/scripts
$ ls -l
total 52
-rwxr-xr-x 1 postgres postgres 38283 Sep 1 11:28 ora2pg
-rw-r----- 1 postgres postgres 8731 Jan 18 2019 ora2pg_scanner
postgres#:/var/lib/pgsql/ora2pg/ora2pg-20.0/scripts
--$ echo $PERL5LIB--
/var/lib/pgsql/PERL_DBI_DBD/lib64/perl5
postgres#:/var/lib/pgsql/ora2pg/ora2pg-20.0/scripts
$ find /usr/local -name PLSQL.pm
find: '/usr/local/lib/python3.6': Permission denied
find: '/usr/local/lib64/python3.6': Permission denied
postgres#:/var/lib/pgsql/ora2pg/ora2pg-20.0/scripts
$ cd $PERL5LIB
postgres#:/var/lib/pgsql/PERL_DBI_DBD/lib64/perl5
$ ls -lrt
total 760
-rw-r----- 1 postgres postgres 121333 Jan 18 2019 PLSQL.pm
-rw-r----- 1 postgres postgres 650113 Jan 18 2019 Ora2Pg.pm
drwxr-x--- 3 postgres postgres 17 Sep 1 11:42 auto
drwxr-x--- 3 postgres postgres 37 Sep 1 11:42 DBD
-rw-r----- 1 postgres postgres 239 Sep 1 11:42 perllocal.pod*

Related

CentOs 7, "Tesseract couldn't load any languages!" however: "List of available languages (2): eng, spa"

this is CentOs 7
when I run tesseract --list-langs
[root#cia tessdata]# tesseract --list-langs
Error opening data file /usr/local/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
List of available languages (2):
eng
spa
[root#cia tessdata]#
however when I run
[root#cia tessdata]# ls -l /usr/local/share/tessdata/
total 328
drwxr-xr-x. 2 root root 4096 Nov 17 23:28 configs
-rw-r--r--. 1 root root 164228 Nov 18 06:11 eng.traineddata
-rw-r--r--. 1 root root 572 Nov 17 23:28 pdf.ttf
-rw-r--r--. 1 root root 157745 Nov 18 06:11 spa.traineddata
drwxr-xr-x. 2 root root 98 Nov 17 23:28 tessconfigs
[root#cia tessdata]#
I get eng.traineddata and spa.traineddata in this form:
cd /usr/local/share/tessdata
wget https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/blob/main/spa.traineddata
:::::::::::::::::::::::::::::::::::::::::::
allways I install languages with:
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/master/spa.traineddata
then allways tesseract work fine, but now this return 404
how I can fix?

rsync ignoring file permissions

I'm sorting and rationalising my backups to my raspberry pi + ext drive
One is a win10 PC that I mount
sudo mount -t cifs //192.168.1.92/blah/PC /mnt/PC -o username=xx,password=xx,ro,uid=pi,gid=pi
and then the source directory (eg)
pi#raspberrypi:~ $ ls -la /mnt/PC/pictures/
total 24284
pi#raspberrypi:~ $ ls -l /mnt/PC/..../Pictures/2009_07_15/ | grep 70
-rwxr-xr-x 1 pi pi 2387027 Jul 15 2009 IMG_0063.JPG
-rwxr-xr-x 1 pi pi 2385117 Jul 15 2009 IMG_0070.JPG
-rwxr-xr-x 1 pi pi 3457076 Jul 15 2009 IMG_0071.JPG
pi#raspberrypi:~ $
pi#raspberrypi:~ $
ive rationalised backups so have some pictures in destination from another source
so the (existing) destination is
pi#raspberrypi:~ $ ls -l /mnt/seagate/PC/../2009_07_15/ | grep 70
-rwxrwxrwx 1 pi pi 2387027 Jul 15 2009 IMG_0063.JPG
-rwxrwxrwx 1 pi pi 2385117 Jul 15 2009 IMG_0070.JPG
-rwxrwxrwx 1 pi pi 3457076 Jul 15 2009 IMG_0071.JPG
when I do
rsync -n -vv -rtdiz --no-owner --no-perms --no-group --progress --log-file=/tmp/rsynclog --backup-dir=/mnt/seagate/deletedfiles/backup-2020-01-07 --delete /source /destination
it says it will delete the files in 'destination' and then copy the same file from 'source'
pi#raspberrypi:~ $ cat /tmp/rsynclog | grep 2009_07_15
2020/01/08 11:55:02 [31205] backed up Documents.../2009_07_15/Thumbs.db to /mnt/seagate/deletedfiles/backup-2020-01-08/....2009_07_15/Thumbs.db
2020/01/08 11:55:02 [31205] backed up Documents..../2009_07_15/IMG_0071.JPG to /mnt/seagate/deletedfiles/backup-2020-01-08/....2009_07_15/IMG_0071.JPG
etc etc
2020/01/08 11:56:45 [31205] .d..t...... Documents/.....Pictures/2009_07_15/
2020/01/08 11:56:45 [31205] .f Documents/.. .2009_07_15/IMG_0061.JPG
2020/01/08 11:56:45 [31205] .f Documents/../Pictures/2009_07_15/IMG_0062.JPG
2020/01/08 11:56:45 [31205] .f Documents../Pictures/2009_07_15/IMG_0063.JPG
etc
I assume because the permissions are different
OK - i could just chmod all the files in 'destination' but I'd like to know what ive done wrong in the rsync command .
The difference i have found which could account for the transfers is
on the source , the mounted windows machine
pi#raspberrypi:/mnt/PC/Documents/path,... $ ls -l | grep ALL
drwxr-xr-x 2 pi pi 0 Jan 1 07:54 ALL PHOTOS
on the destination , the seagate attached HD
pi#raspberrypi:/mnt/seagate/PC/Documents/path,... $ ls -la | grep ALL
drwxrwxrwx 1 pi pi 20480 Dec 18 22:08 ALL PHOTOS

Failed to install JSON/XS.pm

I am getting:
Can't locate JSON/XS.pm in #INC (you may need to install the JSON::XS module)
(#INC contains:
/usr/local/lib/perl5/site_perl/5.24.1/darwin-2level
/usr/local/lib/perl5/site_perl/5.24.1
/usr/local/lib/perl5/5.24.1/darwin-2level
/usr/local/lib/perl5/5.24.1
.
) at get.pl line 13.
(Line breaks added for readability.)
I have tried installing this module using cpan and getting the following message:
Can't write to cpanm home '/Users/sa/.cpanm': You should fix it with chown/chmod first.
I was wondering on what and where to find it to fix it?
$ ls -al ~/.cpanm
total 16
drwxr-xr-x 5 root staff 170 Feb 20 10:37 .
drwxr-xr-x+ 50 sa staff 1700 Feb 20 13:51 ..
lrwxr-xr-x 1 root staff 51 Feb 20 10:37 build.log -> /Users/sa/.cpanm/work/1487615857.2117/build.log
lrwxr-xr-x 1 root staff 41 Feb 20 10:37 latest-build -> /Users/sa/.cpanm/work/1487615857.2117
drwxr-xr-x 4 root staff 136 Feb 20 10:37 work
You did sudo cpanm at some point, and it created files in your home directory that belong to root instead of sa. Fix:
sudo chown -R sa:staff ~/.cpanm
In the future, use cpanm --sudo instead of sudo cpanm to avoid this problem. (It also avoid using root until necessary.)

Concourse Worker Failure on Ubuntu 14.04

After configuring a standalone Concourse 2.4.0 per the instructions, everything seems to be up and running. However, when trying to run the "hello world" example, I can see the following error in the Concourse UI:
runc create: exit status 1: rootfs ("/volumes/live/a72f9a0d-3506-489b-5b9b-168744b892c1/volume") does not exist
"web" start command:
./concourse web \
--basic-auth-username admin \
--basic-auth-password admin \
--session-signing-key session_signing_key \
--tsa-host-key host_key \
--tsa-authorized-keys authorized_worker_keys \
--external-url http://myconcoursedomain:8080 \
--postgres-data-source postgres://user:pass#mydbserver/concourse
"worker" start command:
./concourse worker \
--work-dir worker \
--tsa-host 127.0.0.1 \
--tsa-public-key host_key.pub \
--tsa-worker-private-key worker_key
I'm wondering if the problem occurs since the "missing" directory is created in the directory specified in the "start worker" command, instead of at the actual root directory:
~/concourse# ls -la worker
total 145740
drwxr-xr-x 5 root root 4096 Nov 15 23:07 .
drwxr-xr-x 3 root root 4096 Nov 15 23:07 ..
drwxr-xr-x 3 root root 4096 Nov 15 23:07 2.4.0
drwxr-xr-x 2 root root 4096 Nov 15 23:09 depot
drwxr-xr-x 1 root root 24 Nov 15 23:07 volumes
-rw-r--r-- 1 root root 42142052352 Nov 15 23:15 volumes.img
Concourse is installed on Ubuntu 14.04:
uname -r
4.4.0-47-generic
uname -a
Linux ubuntu-2gb-nyc3-01 4.4.0-47-generic #68~14.04.1-Ubuntu SMP Wed Oct 26 19:42:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
For reasons that I still do not understand, it appears that if you specify the --work-dir value to be /opt/concourse/worker, then the worker will work with this kernel version without issue.
I was using a relative path to a worker directory within a dir in my user folder as my --work-dir value.

custom yum repo not showing rpm

I have a yum repository I've set up where I store custom rpms.
I have no problem finding information about other packages that were built and stored in this custom repo.
#yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug
php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k
No problem.
Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results.
I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir).
[root#reposerver mnt]# ls -l /var/www/repo/
total 12
-rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README
drwxr-xr-x 3 root root 4096 Jun 10 2011 centos
drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/
SRPMS/ i386/ noarch/ repodata/ x86_64/
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/
total 7324
-rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm
drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata
-rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm
-rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm
I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless.
# cat /etc/yum.repos.d/mycompany.repo
[mycompany]
name=mycompany custom repo
baseurl=http://config/repo/centos/5/$basearch
enabled=1
exactarch=0
I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms.
repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion
returns results as well, so it's definitely in the repo data.
yum clean all on the server I was trying to install on worked.
Also make sure to do createrepo --update on the specific subdir instead of the root of the repo.