Execute code in red hat 4 - linux

I have an ec2 instance in redhat 4.
Linux version 4.4.41-36.55.amzn1.x86_64 (mockbuild#gobi-build-60008) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Wed Jan 18 01:03:26 UTC 2017
I'm trying to execute a code made in matlab 2015b I have the m file.
So first I installed the MCR with unziping mat and executing ./install and later I add the environment variables :
LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/sys/os/glnxa64:
MATLAB=/usr/local/MATLAB/MATLAB_Runtime/v90
to my bashrc
So next I wanted to do is execute the m file but in /usr/local/MATLAB/MATLAB_Runtime/v90/bin there is no matlab script.
Reading a little what I need to do is this post: https://hpc.nih.gov/apps/Matlab_compiler.html but When I tried to execute : module load matlab/v90 says module commantd not found
I try this: https://ask.fedoraproject.org/en/question/59399/module-command-not-found-in-fedora-21/ Adding ". /etc/profile" to my .bashrc but seems not to work.
So three questions
How can I run this file .m file, what are the steps for 2015b in
linux 64 bit?
How to get module command working on redhat 4?
For the question 2, I have insmod and modprobe in /sbin/ folder...
are this related to add matlab?

module command here refers to the Environment modules software and not the Linux kernel modules. You should be able to install module on your system by following the installation documentation provided.

Related

How to run Rebol script on Linux 64-bit

I can not run this sample Rebol script
REBOL []
alert
"Hello World"
on Debian 10 Linux 64-bit OS.
The script is from the official Rebol tutorial.
I'm trying to run it using this command from console:
$ rebol hi
but it fails with error message
Script: "Untitled" (none)
** Script Error: alert has no value
** Near: alert "Hello World"
I use the latest available build for Linux x86-64 from the official Rebol site.
REBOL/Core 2.7.8.4.10 (23-Jan-2016)
Copyright 2016 REBOL Technologies
How to run the script?
Does Rebol support GUI on Linux?
I've found in the documentation Rebol runs on all mainstream platforms:
REBOL is cross-platform.
A program written on Windows runs equally well on Linux, BSD, OS X, and many other platforms... with no changes necessary.
Source: http://www.rebol.com/what-rebol.html
But I tried this script and also an Bookmarks example with layout dialect and they both fail with has no value error.
I also tried to add .r extension to the script but it seems it doesn't matter.
The problem is that Rebol has two versions: core and
view. And core version does not has graphics support. But view version does not support 64-bit Linux directly now. No 64-bit build exists, but there's 32-bit build.
To run an alert example using 32-bit build of Rebol View one may need to install required 32-bit libraries (and if I remember correctly first somehow enable 32-bit arch support on 64-bit linux):
On my Debian 10 machine I needed libx11.so.6 and some other X11 related libs:
$ sudo apt install libx11-6:i386 libxext6:i386 libxt6:i386 libxaw7:i386 libfreetype6:i386
Now the script can be run by command such as:
$ rebol hi.r

Check for multiarch on linux/chrome OS?

I'm making a hotfix for AROC on the Chromebook Plux V2 (which has a x86_64 architecture, but no multiarch support) and I want to run a test in his script that checks for it. What command can I use to check for multiarch on a linux x86_64 system?
(Just to reference the original issue) when deploying AROC on that chromebook, the device could not run the i686 busybox binary that the script installs.
The author insists on the i686 binary, because the android containers that he tests deployments on are 32 bit on a host system with multiarch.
My goal is to fix his script and add support for the device I was testing on.
I plan to do this, by checking for multiarch and installing the i686 binary if a 32 bit runtime exists or installing the x86_64 binary if it doesn't. What command can I use to check for multiarch?
you're asking about multilib support, not multiarch.
you can simply check to see if the 32-bit ldso exists: test -e /lib/ld-linux.so.2.

what are the alternatives for running a Mach-O 64-bit binary file on a linux machine?

step 1:
am running on a 64 bit linux machine.
(command): uname -a
(result): Linux ****** 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux.
step 2:
i checked the file type of the "binary file" i want to run.
(command): file keymaker
(result): keymaker: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
step 3:
i made the "mach-o" file executable by changing file permissions.
(command): chmod +x keymaker
step 4:
i run the "binary file".
(command): ./keymaker
(result): bash: ./keymaker: cannot execute binary file: Exec format error
step 5:
When i searched on stack overflow for a similar problem i found one but it said that:
(Answer): There is currently no working Mach-O loader for Linux.
(Reference): Can I run a binary file that is Mach-O executable i386 on linux?
step 6: i have a "linux version" of an application installed on my linux machine, but i need to run this "keymaker file" to provide me with a "license key".
And i don't want to install a full (4GB +) MAC OS operating system probably in a virtual machine just to run a simple binary file.
I understand this is a MAC OS file but my theory was that since we can use the "wine application" for Windows OS applications on linux, there must be alternatives as well for MAC OS needs.
The answer referenced in your question is from 2010. Unfortunately, it seems that it is still of actuality.
The link you gave in comment is a little more interesting because it links to the Darling project that declares
Darling is a translation layer that allows you to run unmodified macOS binaries on Linux. In its nature, it is similar to the well-known Wine project.
Wow exactly what you asked! But it looks to still be in early stages and not aimed at end users:
At this point, does not yet run macOS application with a GUI.
TL/DR: you should try the Darling project. Whether it is able to start your program is far from sure, but it seems to be your best bet, mainly if your prog does not use a GUI.

Cava Packger executable (made from perl) not working in 64 bit Ubuntu 14.04

I have prepared executable from my perl code for distribution
It works fine on my own ubuntu 12.04 where it was created
It should work without perl on any system
But After execution of executable on Ubuntu 14.04 LTS, (64 bit) it gives
Error:
Can't load '/home/osboxes/Version-1/lib/vrt/16e8aba612e215bf6a5195289f1a16d8/Prima.so' for module Prima: libgif.so.4: cannot open shared object file: No such file or directory at <content>/DynaLoader.pm line 157.
After installing libgif4 it gave error
libtiff.so.4: cannot open shared object file: No such file or directory
What may be the cause for this and solution for this.
Ubuntu 14.04 LTS includes libtiff5 by default. Versions up to 13.04 had libtiff4. I made the executable compatible with libtiff4. also just installing libtiff4 by Ubuntu Software Center did not help so I installed it manually.
Downloaded it from here and installed by command:
sudo dpkg -i ./libtiff4_3.9.7-2ubuntu1_amd64.deb

Unable to use the Linux service to start Archiva 2.1.0

I'm trying to start the recently published Apache Archiva v2.1.0 (Standalone) on Linux.
For testing purpose, the zip has been uncompressed in /opt/archiva-2.0.
The docs says:
http://archiva.apache.org/docs/2.1.0/adminguide/standalone.html
On Linux, the bin/archiva script is suitable for linking or copying to
/etc/init.d/archiva and running as root, as long as the RUN_AS_USER
environment variable is set within the script.
So I've copied the /opt/archiva-2.0/bin/archiva Shell script in /opt/init.d.
I tried with both:
#RUN_AS_USER=root
and
RUN_AS_USER=root
but I always get the same error at startup:
>service archiva console
/etc
Unable to locate any of the following operational binaries:
/etc/rc.d/init.d/./wrapper-linux-x86-64
/etc/rc.d/init.d/./wrapper-linux-x86-32
/etc/rc.d/init.d/./wrapper
For information:
>uname -a
Linux ****** 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Any idea?
Making symbolic link of the bin/archiva script to /etc/init.d/archiva works better and that way the script is just in one place.
$ ln -s /opt/archiva-2.0/bin/archiva /etc/init.d/archiva

Resources