Installing Oracle 11g 64 bit on Rhel 6 - linux

I am facing this error when I am running the Installer for Oracle Database 11g 64 bit. While installing at first few attempts it did not gave the error mentioned below but after installing prerequisite rpm it is giving me
#./runInstaller
"You are attempting to install 64-bit Oracle on a 32-bit operating system. This is not supported and will not work."
I fired the arch command which tells me x86_64. What rpm do I have to remove or install to resolve this issue?

The runInstaller script generates that error from:
UNAME=/bin/uname
GETCONF=/usr/bin/getconf
...
if [ `$UNAME` = "Linux" ]; then
if [ -e $GETCONF ]; then
value=`$GETCONF LONG_BIT`
if [ $value != 64 ]; then
echo "\"You are attempting to install 64-bit Oracle on a 32-bit operating system. This is not supported and will not work.\"";
exit 0;
fi
fi
fi
So on your Linux system, /usr/bin/getconf LONG_BIT is returning something other than 64; presumably it's saying 32.
arch is deprecated but uname -m should give you the same x86_64. That is reflecting the hardware, while getconf is reflecting the operating system. The information uname gives with -i and -p will presumably also report x86_64.
So you appear to be running a 32-bit version of RHEL 6 (or at least a 32-bit kernel) on 64-bit hardware. That isn't something you can fix by installing or removing something.
If you are intentionally running a 32-bit operating system then you'll need to install the 32-bit version of Oracle.

Related

-bash: ./ex1: cannot execute binary file: Exec format error [duplicate]

When I try to execute a 32-bit file compiled with gcc -m32 main.c -o main on Windows Subsystem for Linux, I get the following error: bash: ./main: cannot execute binary file: Exec format error.
If I compile it without -m32 it runs.
Any solution for running 32-bit executable on WSL?
QEMU and binfmt support light the way :)
https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520
After reading that the WSLInterop between WSL and Windows processes used binfmt, I was tinkering with QEMU to try some ARM development, and incidentally discovered how to get 32-bit support working.
Edit: requires "Fall Creators Update", 1709, build 16299 or newer
Install qemu and binfmt config:
sudo apt install qemu-user-static
sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
You'll need to reactivate binfmt support every time you start WSL:
sudo service binfmt-support start
Enable i386 architecture packages:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install gcc:i386
Try it out:
$ file /usr/bin/gcc-5
/usr/bin/gcc-5: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=2637bb7cb85f8f12b40f03cd015d404930c3c790, stripped
$ /usr/bin/gcc-5 --version
gcc-5 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc helloworld.c -o helloworld
$ ./helloworld
Hello, world!
$ file helloworld
helloworld: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=3a0c7be5c6a8d45613e4ef2b7b3474df6224a5da, not stripped
And to prove it really was working, disable i386 support and try again:
$ sudo service binfmt-support stop
* Disabling additional executable binary formats binfmt-support [ OK ]
$ ./helloworld
-bash: ./helloworld: cannot execute binary file: Exec format error
32-bit ELF support isn't provided by WSL (yet). There doesn't seem to be any progress since the UserVoice was raised - you are out luck.
See UserVoice: Please add 32 bit ELF support to the kernel and Support for 32-bit i386 ELF binaries.
If possible, switch to a real Linux ;-)
Since this was originally posted, the support has been available on WSL2 which does support real Linux kernel! So that should be the preferred way.
As noted in the linked github issue, there's also qemu-user which can be used if WSL1 is still used.
WSL2 runs in a real virtual machine using a real Linux kernel, therefore it's actually possible to do anything a Linux VM can do, including running 32-bit code. Just install 32-bit libs by running
sudo dpkg --add-architecture i386
sudo apt-get update
For more information read
Announcing WSL 2
WSL 2 FAQ

Nodejs installation not working in solaris

I have a 64 bit SunOS (Solaris) where i have installed (extracted) nodejs in that machine.
when i execute the "node" command it throws an error "-bash: /export/home/toml/das/node-v0.12.7-sunos-x64/bin/node: Invalid argument"
I don't know how to resolve this issue. Note: i have download the tar file from this location - https://nodejs.org/dist/v0.12.5/node-v0.12.5-sunos-x64.tar.gz
Note : we have a SPARC BOX
You need a SPARC binary - you can't use an x64 (64-bit x86) binary on a SPARC machine.
"Invalid argument" is the poor error message shown when you try to run the wrong type of binary on Solaris.

Running valgrind 32bit binaries on 64 bit machine

I'm trying to run valgrind 32bit binaries on 64 bit machine(linux) and i'm getting this error:
valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No
such file or directory
What do i need to do to make it work?
You do not have installed Valgrind for analysing 32-bit programs on your Linux distribution.
For example on Ubuntu 15.04, installing Valgrind via
apt-get install valgrind
installs both 32-bit and 64-bit versions of the Valgrind analytical tools:
$ ls -1 /usr/lib/valgrind/memcheck-*
/usr/lib/valgrind/memcheck-amd64-linux
/usr/lib/valgrind/memcheck-x86-linux
What is you Linux distribution?
I had the same issue and fixed it by setting VALGRIND_LIB to Valgrind's library path (eg. /usr/local/lib/valgrind) in my .bashrc:
export VALGRIND_LIB="/usr/local/lib/valgrind"
I don't know why this is not mentioned in the Valgrind Installation Instructions or why I had to add this following these instructions, however I found this hint in the README_DEVELOPERS shipped with the sources.

How to execute shell scripts from 32-bit Wine on 64-bit Linux?

My 32-bit application is running under Wine, and to help it better integrate with the environment, it runs some shell scripts. I was just testing under Ubuntu 14.04 64-bit, and my program crashed with this error:
err:process:create_process starting 64-bit process L"Z:\\bin\\sh" not supported in 32-bit wineprefix
I've tried searching for a 32-bit build of "sh" on my system, but couldn't find one. Any creative ideas on how I can get past this issue?
I am a user of the program in question and I did some experimenting with it.
Not 32-bit vs. 64-bit but "shared object" vs. "executable" ?
Running file /bin/dash it prints:
/bin/dash: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), ...
Running file /bin/bash however prints:
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), ...
dash is a "shared object" while bash is an "executable". Clearly /bin/dash seems to work like an executable in some way (I don't know the technical details here), but it seems that this difference matters to Wine.
I got the same error as you reported (can't start 64 bit process) for Wine 1.4, but the error I got on newer versions of Wine was wine: Bad EXE format for Z:\bin\sh..
If you actually just replace /bin/sh with /bin/bash (even though that's a 64-bit binary) it will work. Wine also didn't seem to like running a symlink, but copying over /bin/bash worked.
So first back up the existing (symlinked) /bin/sh with:
sudo cp /bin/sh /bin/sh_orig
Then copy bash to sh:
sudo cp /bin/bash /bin/sh
Then when I ran Wine with the program and its calls to /bin/sh work fine.
Alternatively, you download a 32-bit shell directly
Pull down the .deb file for the 32-bit bash shell:
wget http://us.archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.3-6ubuntu1_i386.deb
I your home directory, extract it into a folder:
mkdir ~/bash_4.3-6ubuntu1_i386
dpkg -x bash_4.3-6ubuntu1_i386.deb ~/bash_4.3-6ubuntu1_i386
Copy the bash script into /bin/sh:
sudo mv /bin/sh /bin/sh64original
sudo cp ~/bash_4.3-6ubuntu1_i386/bin/bash /bin/sh
sudo chown root:root /bin/sh
Or run schroot, but still must copy /bin/bash to /bin/sh
Basile Starynkevitch mentioned above about setting up a 32-bit shell in an schroot environment. I did that with an Ubuntu 14.04 32-bit environment and ran into the same issue with the dash vs. bash "shared object" vs. "executable" (but when I copied /bin/bash to /bin/sh it worked), so that helped me realize that the distinction wasn't the 32-bit vs. 64-bit difference but the format of the shell executables that mattered to Wine.
If you would like I can post details for setting up the schroot evnironment but basically I followed the instructions at https://help.ubuntu.com/community/DebootstrapChroot but needed to configure the /etc/apt/sources.list to have the full list of packages (as are installed in my default host system) for apt-get install wine to work.

unable to run a binary in mac,running on Linux

I am using a software for graph mining.
I have got the binary of that software in 2 folders for Linux mode and SunOs mode but don't have the source.
I am able to run the binary in Linux machine.
But when I want to run the binary in a Mac machine I am getting "command not found" for both the Linux and SunOs folders' binaries.
Could someone suggest if it can be able to run this in a MAC machine by any means like using a Linux shell or something
Gaurav
EDIT:I am getting "cannot execute binary" error when I set chmod to "u+x"
You'll need to recompile it for OS X or use a VM.
A command not found just means you're not executing it right, make sure it's chmod u+x and it's either on your PATH, or you specify the path explicitly.
If you use the file command you will see the difference, on the linux executable you'll have something like:
ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically
linked, for GNU/Linux 2.6.15, not stripped
and something like this for OS X executables:
command: Mach-O universal binary with 2 architectures command (for
architecture x86_64): Mach-O 64-bit executable x86_64 command (for
architecture i386): Mach-O executable i386
Operating systems generally don't support executing object code any extra formats... If Mac osx decended from solaris or Linux, then there could be some incentive for legacy support. But just assume everything to be binarily incomparable if it was compiled for a different arch and platform. There are a few places where you inherit backwards compatibility, running 32 but code on 64 bit oses... Or ppc code support on intel macs, but I suspect that both of those, especially the latter were non trivial engineering tasks.
Here are your options...
Get the source and compile on the Mac, if it compiles on Linux and solaris good chance it will compile and run ok on Mac.
Run through an emulator or boot camp

Resources