I'm newbie in DB2 database administration and I couldn't think that I'd be stuck with the installation process. I read some documents before installation and found an interesting "db2prereqcheck" thing.
So I tried to run it before installation and got an error:
DBT3505E The db2prereqcheck utility was unable to determine the Linux distribution level.
About this error from ibm:
IBM Knowledge Center: DBT3505E
IBM Support: db2prereqcheck fails checking Linux distribution
I found some other answers where suggest to delete the files "/etc/issue" and "/etc/issue.net".
I checked my "/etc/issue*" files according to the tips. I filled that files with the example from the article in IBM Support, but nothing has changed. I tried running this script on other servers with CentOS, Debian operating systems, but got another error:
./db2prereqcheck
DBI1189E There has been an attempt to use db2prereqcheck
on an image for a platform that does not match the current platform
'Linux/x86-64' on which it is being run.
Explanation:
Possible causes include:
- This DB2 install image is not valid for the current
platform.
- The current platform is not supported by DB2.
User Response:
Install DB2 using the DB2 install image that corresponds
with the current platform 'Linux/x86-64'.
I've already installed db2, but my self-esteem is down. So the question is: my hands are a problem or is the problem in another? And how to make db2 work
Technical details:
cat /etc/issue
Amazon Linux AMI release 2018.03
Kernel \r on an \m
cat /etc/*-rel*
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Amazon Linux AMI release 2018.03
cpe:/o:amazon:linux:2018.03:ga
uname -a
Linux hostname.host 4.14.47-56.37.amzn1.x86_64 #1 SMP Wed Jun 6 18:49:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
As you may have noticed, this is an EC2 instance.
DB2 versions:
IBM® Db2 11.1 Developer-C Edition for Linux® on AMD64 and Intel® EM64T systems (x64)
IBM® DB2 Express-C Version 11.1
I would appreciate your help in this matter. Thank you for your time.
If db2prereqcheck reports :
DBT3505E The db2prereqcheck utility was unable to determine the Linux
distribution level. Aborting the current installation ... Run
installation with the option "-f sysreq" parameter to force the
installation.
and if other IBM suggestions do not apply, then you may be able to avoid this symptom with the following workaround:
(as root)
cp /etc/os-release /etc/lsb-release
The reason it works is that some versions of db2prereqcheck look only for the following files in turn:
/etc/centos-release
/etc/redhat-release
/etc/SuSE-release
/etc/lsb-release
If none of those files are present, the DBT3505E symptom can result.
If your distro (or container) has an equivalent file (for example, Debian may have /etc/os-release) then simply copying it to /etc/lsb-release will allow db2prereqcheck to complete.
db2prereqcheck checks and understands only /etc/SuSE-release with the following content:
SUSE Linux Enterprise Server 15 (x86_64)
VERSION = 15
PATCHLEVEL= 1
This works also with OpenSuse Leap 15.1. This file is deprecated since SLES 12. So you must create it your self. Then run db2prereqcheck and install all missing libraries and kernel sources mentioned. Having all requirements fulfilled you may finally see the segmentation fault message:
Validating "Intel TCO WatchDog Timer Driver modules" ...
DBT3546E The db2prereqcheck utility failed to determine whether the
following file or package exists: "".
Segmentation fault (core dumped)
Don't worry!
Simply retest with db2prereqcheck -i. The -i parameter checks for prerequisites that are not Db2 pureScale related. If we don't install pureScale and all requirement are fulfilled, we can ignore this ugly segmentation fault.
Otherwise you must blacklist by adding:
blacklist iTCO_wdt
blacklist iTCO_vendor_support
Into the file /etc/modprobe.d/blacklist.conf
A further issue is related to:
export DISPLAY=your.machine.ip:0.0
running ./db2setup as root doesn't work.
./db2_install is deprecated, but it works.
First create the db2 users and groups as described by the IBM Knowledge Center.
Then run ./db2_install as root, followed by creating an instance using db2icrt.
Login as db2inst1 and test as described by the IBM Knowledge Center eventually creating the SAMPLE Database, etc. Normally "first steps" would do the job, but it crashes with javascript error. Hence you must do it manually!
Additional manual configuration may be required as opening the firewall for port 50001 and setting this port within /etc/services and within dbm cfg with:
db2 update dbm cfg using SVCENAME 50001
or
db2 update dbm cfg using SVCENAME db2c_db2inst1
If you use the latter you must update /etc/services with the line:
db2c_db2inst1 50001/tcp #and a comment like db2 tcp/ip
connection port.
Related
Problem Statement
Trying to install PHP8.0 on ARM based server with OS Amazon-Linux-2 having aaPanel as the server management software installed.
Looking forward for solutions with perspective from aaPanel.
Environment Info
Bit:64 Mem:952M Core:2 gcc:7.3.1 cmake:2.8.12.2
Linux 4.14.248-189.473.amzn2.aarch64 aarch64
ERROR: php-8.0.11 install failed.
Error
checking for brotli/decode.h... no
configure: error: BROTLI libs and/or directories were not found where specified!
cat: /etc/redhat-release: No such file or directory
aaPanel Screenshot
I'm running macOS Catalina 10.15.7 and I need to install Oracle Instant Client to run run a Perl script that connects to a DB.
1. Installing Oracle Instant Client
I downloaded the packages I needed:
Basic Light Package (DMG)
SDK Package (DMG)
ODBC Package (DMG)
From Instant Client 19.8 and followed the installation instructions without any issues (just copying and pasting)
The files are extracted in /Users/username/Downloads/instantclient_19_8
2. Setting ORACLE_HOME
Next, I did set ORACLE_HOME to /Users/username/Downloads/instantclient_19_8
export ORACLE_HOME=/Users/username/Downloads/instantclient_19_8
3. Installing DBD::Oracle
When I tried to install DBD::Oracle I got the following error:
$ cpanm DBD::Oracle
--> Working on DBD::Oracle
Fetching http://www.cpan.org/authors/id/M/MJ/MJEVANS/DBD-Oracle-1.80.tar.gz ... OK
Configuring DBD-Oracle-1.80 ... N/A
! Configure failed for DBD-Oracle-1.80. See /Users/username/.cpanm/work/1608142485.48272/build.log for details.
The log file's content:
$ cat /Users/username/.cpanm/work/1608142485.48272/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.032000 built for darwin-thread-multi-2level
Work directory is /Users/username/.cpanm/work/1608142485.48272
You have make /usr/bin/make
You have LWP 6.47
You have /usr/bin/tar: bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
You have /usr/bin/unzip
Searching DBD::Oracle () on cpanmetadb ...
--> Working on DBD::Oracle
Fetching http://www.cpan.org/authors/id/M/MJ/MJEVANS/DBD-Oracle-1.80.tar.gz
-> OK
Unpacking DBD-Oracle-1.80.tar.gz
Entering DBD-Oracle-1.80
Checking configure dependencies from META.json
Checking if you have Config 0 ... Yes (5.032000)
Checking if you have Encode 0 ... Yes (3.06)
Checking if you have Math::BigInt 0 ... Yes (1.999818)
Checking if you have Devel::Peek 0 ... Yes (1.28)
Checking if you have Test::More 0 ... Yes (1.302177)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.44)
Checking if you have Data::Dumper 0 ... Yes (2.174)
Checking if you have DBI 1.623 ... Yes (1.643)
Checking if you have Test::NoWarnings 0 ... Yes (1.04)
Configuring DBD-Oracle-1.80
Running Makefile.PL
Using DBI 1.643 (for perl 5.032000 on darwin-thread-multi-2level) installed in /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/darwin-thread-multi-2level/auto/DBI/
Configuring DBD::Oracle for perl 5.032000 on darwin (darwin-thread-multi-2level)
If you encounter any problem, a collection of troubleshooting
guides are available under lib/DBD/Oracle/Troubleshooting.
'DBD::Oracle::Troubleshooting' is the general troubleshooting
guide, while platform-specific troubleshooting hints
live in their labelled sub-document (e.g., Win32
hints are gathered in 'lib/DBD/Oracle/Troubleshooting/Win32.pod').
Trying to find an ORACLE_HOME
Your DYLD_LIBRARY_PATH env var is set to ''
The ORACLE_HOME environment variable is not set and I couldn't guess it.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the appropriate troubleshooting guide for your OS for more information.
ABORTED!
-> N/A
-> FAIL Configure failed for DBD-Oracle-1.80. See /Users/username/.cpanm/work/1608142485.48272/build.log for details.
I've read here that ORACLE_HOME should be set to the value of the directory that contains the /bin directory but I can't find any /bin.
macOS is always changing, but on Mojave I installed Instant Client from the DMGs and then did:
brew install perl
ln -s $HOME/Downloads/instantclient_19_8 $HOME/instantclient
export DYLD_LIBRARY_PATH=$HOME/instantclient
cpan -i -T DBI
cpan -i -T DBD::Oracle
In general, never set ORACLE_HOME for Instant Client. (It can cause the wrong config files to be read). ORACLE_HOME is used for a 'full' database or full client installation, not for Instant Client. However some installers still reference the variable to find build files, so you will need it - at least at build time. DBD::Oracle will internally search for Instant Client and use $HOME/instantclient if $ORACLE_HOME isn't set.
macOS has gradually removed the usefulness of DYLD_LIBRARY_PATH, since it isn't propagated to subshells. This means it can't reliably be used. On Mojave I found I could alternatively copy the Instant Client libraries to $HOME/lib/ and didn't need to set DYLD_LIBRARY_PATH.
Side note: if you're using DBD::Oracle you don't need the Instant Client ODBC package.
Christopher Jones answer was not enough for me (macOS Monterey 12.2, Apple M1 Pro). The installation stopped with
./Oracle.h:37:10: fatal error: 'oci.h' file not found
To fix this, installation of Oracle SDK Package was required https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html#ic_osx_inst
Second comment:
export DYLD_LIBRARY_PATH=$HOME/instantclient
does not work (see Bash variable of name starting with 'DYLD' is not loaded into environment: bug or feature? )
==================================================
But this is not the end-of-the-problem. The installed DBD::Oracle can not be used. It fails:
Can't load '/Users/myname/.perlbrew/libs/perl-5.34.1#eien6/lib/perl5/darwin-2level/auto/DBD/Oracle/Oracle.bundle'
for module DBD::Oracle: dlopen(/Users/myname/.perlbrew/libs/perl-5.34.1#eien6/lib/perl5/darwin-2level/auto/DBD/Oracle/Oracle.bundle, 0x0001):
symbol not found in flat namespace '_OCIAttrGet' at
/Users/myname/perl5/perlbrew/perls/perl-5.34.1/lib/5.34.1/darwin-2level/DynaLoader.pm line 197.
Is this related to the MacOS SIP mechanism ? How to use DBD::Oracle ?
I installed the Oracle Instant Client version 19.3 on my Mac Os Catalina version 10.15.4
But i still have the same error on python3.7 and python3.8:
Origin: (cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(libclntsh.dylib, 1): no suitable image found. Did find:
file system relative paths not allowed in hardened programs". See https://oracle.github.io/odpi/doc/installation.html#macos for help
(Background on this error at: http://sqlalche.me/e/4xp6)
here is my installation:
$: ls-l ~/lib
ls -l ~/lib
total 0
lrwxr-xr-x 1 giacomocallegaro staff 58 22 Apr 09:13 libclntsh.dylib -> /Users/giacomocallegaro/instantclient_19_3/libclntsh.dylib
$: cat .zprofile
Setting PATH for Python 3.8
The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
Setting PATH for Python 3.7
The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH=$PATH:~/instantclient_19_3
export PATH
$: echo $PATH
/Users/giacomocallegaro/.nvm/versions/node/v12.14.1/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/giacomocallegaro/.nvm/versions/node/v12.16.1/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/opt/openssl/bin:/Users/giacomocallegaro/instantclient_19_3:/Users/giacomocallegaro/instantclient_19_3
$: which python:
/usr/bin/python
when I run sqlplus:
$: sqlplus -v
SQL*Plus: Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Can some one help me please?
Go to https://www.oracle.com/technical-resources/
Downloads --> Oracle Instant Client --> macOS(Intel x86) --> Basic Package
In your download folder you will find a folder named instantclient_19_3
Add the following to your python script
import cx_Oracle
cx_Oracle.init_oracle_client(lib_dir=r'/Users/<username>/Downloads/instantclient_19_3')
Some windows will pop up, so go to System preferences --> Security & Privacy --> General and there you will see a notification. Click on open anyway. You will have to repeat this last step 3-4 times.
After you download instant client from here, create a symbolic link into /usr/local/lib folder (that's where all .dylib files keep their symbolic links).
In my case, I extracted instant client into /opt/oracle/instantclient_19_3. So the command is:
$ ln -s /opt/oracle/instantclient_19_3/libclntsh.dylib /usr/local/lib/
However, there is another problem when I try to create the connection from python:
Error while trying to retrieve text for error ORA-01804
Oracle says: "Instant Client 19.3 and 18.1 support macOS Mojave and High Sierra", and I have macOS Catalina 10.15, don't know if this has anything to do with that, error 01804 says that timezone information is invalid.
More info on this: http://www.dba-oracle.com/t_ora_01804_start_oracle.htm
EDIT: issue resolved.
After downloading the SQL*Plus Package I managed to connect and verify the instant client works. My python issue was also resolved when I restarted IntelliJ (I was running the server from within so the PATH might have not been updated).
Maybe the error is misleading and it is related to general issue with Oracle Instant Client on MacOS Catalina? Have a look at this blog post:
Gary's Oracle On Tap
Hope this helps!
I'm trying to install the Awesome VM in Alpine Linux following this tutorial.
I have passed the following commands:
$ sudo apk add awesome feh lxterminal
$ sudo apk add lua
$ setup-xorg-base
Then and all the commands in the "Start Your Desktop" section ...
... but when I pass this command :
$ startx
I got the following errors:
hostname: dev-box: Host not found
xauth: unable to link authority file /home/babonet13/.Xauthority, use /home/babonet13/.Xauthority-n
xauth: unable to link authority file /home/babonet13/.Xauthority, use /home/babonet13/.Xauthority-n
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.14.39-0-vanilla x86_64 Alpine Linux
Current Operating System: Linux dev-box 4.14.69-0-vanilla #1-Alpine SMP Mon Sep 10 19:33:23 UTC 2018 x86_64
Kernel command line: BOOT_IMAGE=vmlinuz-vanilla root=UUID=26f38daa-766f-49f1-abb3-a0f7e8fc9d15 modules=sd-mod,usb-storage,ext4 nomodeset quiet rootfstype=ext4 initrd=initramfs-vanilla
Build Date: 30 August 2018 02:57:08PM
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 5 13:33:54 2018
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
deallocvt: can't open console
Can could help me to start debugging it in the right way?
This is a problem installing X.org on Alpine Linux, you have not yet reached the point where Awesome is involved. I suggest you edit your post title and tags to reflect this. Also, stackoverflow is for programming question. If you have further installation issues, it is preferred to use SuperUser
Nevertheless:
(EE) no screens found(EE)
This is the error. It usually means you didn't install the video drivers or your kernel doesn't have the right modules or you use a static X.org build and it doesn't have the right compile options or you have a custum xorg.conf[.in] file that isn't representative of your setup.
/var/log/Xorg.0.log may have more information, but from my past experience with this kind of issue, wont provide more relevant details.
Also, it is AwesomeWM, not Awesome-VM.
I need help compiling nginx with the perl_module on my Mac:
System Software Overview:
System Version: OS X 10.11.1 (15B42)
Kernel Version: Darwin 15.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Philipp
User Name: XXXXXXX XXXXXXXX (philipp)
Secure Virtual Memory: Enabled
Time since boot: 4 days 22:46
I configure nginx to be compiled with PCRE and PERL, i.e.,:
./configure --with-pcre=/Users/philipp/downloads/pcre-8.38 --with-http_perl_module --prefix=/servers/nginx
The output of the configure states:
checking for perl
+ perl version: This is perl 5, version 18, subversion 2 (v5.18.2)
built for darwin-thread-multi-2level
+ perl interpreter multiplicity found
If I execute make I run into the following error:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I googled and found a hint to export KERNEL_BITS=64, which did not solve the problem. Any suggestions on how to compile nginx with perl. The compilation succeeds without the --with-http_perl_module option, but in that case I cannot use perl in the nginx.conf (of course :)).
UPDATE:
I was not able to compile nginx with perl. I ended up using a pre-compiled package, which is kind of unsatisfying, because now I have to deal with a lot of packages I don't like. Anyways, if someone has a solution I'd be more than happy to know.
I'm not sure if this is offtopic or not, but as it's about using perl within nginx (which I do, and is awesome).
I had a similar problem when trying to build this module. The root of it was that I hadn't got the right LD flags.
The easiest way of doing this - IMO - is install nginx from a package, run nginx -V and see what flags were used - copy them all, and include the extras. (And check it wasn't already build in your distribution - it was in mine, which I think was a Centos 7.2 package - I don't have it to hand, but I'm not sure it would necessarily help)
You may also need to install a new perl version, to go with it though.
--with-pcre=../modules/pcre-8.38
--with-openssl=../modules/openssl-1.0.2g
--prefix=/usr/local/nginx
--with-http_perl_module
--with-http_ssl_module
--with-http_addition_module
--with-http_sub_module
--with-http_realip_module
--with-http_stub_status_module
--with-cc-opt='-I /usr/local/include'
--with-ld-opt='-L /usr/local/lib -L/usr/local/opt/perl518/lib'
I got the same problem. after about 3 hours digging with this, finally solved. This is my configure file, i installed perl518 with brew located in /usr/local/opt/perl518/lib, and use the newest nginx source code of version nginx version: nginx/1.10.0.
Things seems happend as #Sobrique said, you need to give the right --with-ld-opt & --with-cc-opt.
important, after ./configure, DO NOT doing make immediately, vi ./objs/Makefile and modify openssl config from './config' to './Configure darwin-x86_64-cc' so that it can build openssl in x86_64 mod.
Hope it can help you!