How can I run .exe file on ubuntu 12.04 machine? - linux

In my organization C developers developed one Application and given to us as a .exe format.
If any end-user send any Http request.This .exe will be run, for this I wrote the Java code(ProcessBuilder()) and deployed in Application Server(Apache Tomcat).It's working fine.These everything was done in my local system(Windows 7).
But we are using Ubuntu 12.04 as a server.Here that .exe file is not working.
How can I fix this.

You need to install wine software if you want to run a .exe file in ubuntu .
installing the wine software in ubuntu is a simple two step process.
Type the command in the terminal
sudo apt-get update
sudo apt-get install wine1.5
Once the wine is installed, you can open any .exe file using wine .
Say this , i have a file game.exe , right click - open with - wine .

You need to install wine software if you want to run a .exe file in ubuntu . installing the wine software in ubuntu is a simple two step process. Type the command in the terminal
sudo apt-get update
sudo apt-get install wine1.5 (1.5 changes with what ever number the latest edition is)
Even better go to Ubuntu software center and install thru GUI based process
Once the wine is installed, you can open any .exe file using wine . Say this , i have a file pumpai.exe , right click - open with - wine .
And Enjoy...Its Open Source..........
Pramod Pai

You basically can't execute a windows executable on Linux (but maybe try with wine).
You should ask the source code of that C application inside your organization, and port it and compile it (with gcc -Wall -g at first) on your Linux server.
I suggest you to install Linux on your local machine (or laptop) to learn it first.

Related

E: Unable to locate package ea-utils | Ubuntu 18.04

I am following this tutorial. I already have .fastq files. I want to install ea-utils.
My setup is Ubuntu 18.04 bionic, via Oracle VM Virtual Box.
In terminal, I entered the command:
>>>sudo apt install ea-utils
E: Unable to locate package ea-utils
First, I installed latest Ubuntu updates via. Software Updater.
Then,
>>>sudo apt-get update
E: Some index files failed to download. They have been ignored, or old ones used instead.
Still throwing an error:
>>>sudo apt-get install ea-utils
Second command said: E: Unable to locate package ea-utils.
You cannot install it using Git-Bash. Git-Bash is not a Linux environment (apt-get is a Linux utility that can be used in a Linux environment). Git-Bash is a subset of the MSYS (or MSYS2, not sure) collection of open source tools compiled for Windows
What you can try is
build your own version of ea-utils for Windows. build guide - I will elaborate if required
check if there are any precompiled binaries for it
Expanding on building/compiling your own binaries of programs
Normally a program is written in a programming language (e.g C/C++, Java) that humans can read. These are plain text files.
That is compiled into something computers can read
This compiled file is executable on the platform which it is compiled for - ends in .exe for Windows
This executable file is distributed as a 'precompiled binary' that is copied into (usually) C:\Program Files by the installation procedure
But things change in the world of open source software
You are given the original files of code written in a programming language
You use a compiler combined with other libraries to compile it into an executable file
MinGW is a collection of tools, including the C/C++ compiler for Windows
GSL is a library that provides some other code that ea-utils depends on for the compilation of the binaries
General instructions for building
(Sorry I cannot test these. I do not use Windows any more)
Install MinGW - accepting the defaults should work fine
Install GSL - try the link that says Setup (again, accept defaults)
Unzip the file you downloaded earlier from ea-utils' GitHub
Open command prompt
cd into the unzipped folder
(based on instructions on their wiki) make
make test
Since your updated question is based on using Ubuntu 18.04 in a VM and you there is still an error, I suggest trying
sudo apt-get update
sudo apt-get install ea-utils
Commonly, software in the Linux word is distributed as "packages" - e.g ea-utils. The first command contacts Ubuntu's repositories (they serve the packages) and generates a list of all the available packages.
That should fix the error of ea-utils not being found.
Following the constant errors being thrown,
Download the .deb file 64-bit version or 32-bit version according to the virtual machine you are running. Open it inside the virtual machine, and follow the onscreen instructions.

Can't execute .run file in Ubuntu container

there.
I'm trying to install the Microchip XC8 compiler on a Ubuntu container to make a pipeline for building the project with Gitlab CI. But there's no response after I run the "xc8-v1.45-full-install-linux-installer.run" file.
Here is the environment I have:
Official Ubuntu 18.04 LTS image on a Docker container
Docker version 19.03.13
Windows 10 as Docker host
Microchip XC8 v1.45 compiler
And the commands I used for downloading and installing are as following:
# Download XC8 from the Microchip official site
wget http://ww1.microchip.com/downloads/en/DeviceDoc/xc8-v1.45-full-install-linux-installer.run
# Change the access permission
chmod +x xc8-v1.45-full-install-linux-installer.run
# Execute the ".run" file
./xc8-v1.45-full-install-linux-installer.run
After I did them all, there's no response. Obviously, something went wrong.
I have tried the installation process above on a native Ubuntu computer, and it just works fine.
Is there any prerequisite I missed? Or there have some ways for me to achieve the same purpose?
Thanks!
I was having this problem on 64 bit Ubuntu 20.04 as well.
I had several problems, could not change execution bit because it was on an NTFS partition and the executable required 32 bit libraries to run.
First I had to move the file from an NTFS partition so that I could set the file to executable. In my case I moved it to my downloads directory and then in that folder executed:
sudo chmod +x ./xc8-v1.42-full-install-linux-installer.run
It still would not run, so I checked its type by executing:
file ./xc8-v1.42-full-install-linux-installer.run
which resulted in the response:
./xc8-v1.42-full-install-linux-installer.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, no section header
Eventually the main solutions was to install 32 bit libraries:
sudo apt-get install lib32z1
Finally I could install install that 32 bit library. Then running this worked:
sudo ./xc8-v1.42-full-install-linux-installer.run
Using existing MPLAB Docker repo
This GitLab.com project exists:
MPLAB X IDE/IPE podman/docker container
This may not help with your .run file problem, but maybe switching to an existing docker container might make it easier for you.
They also work with .run files, so you may find your solution over there as well.
Features:
Has a general-purpose installation of MPLAB X and the toolchain.
X11 forwarding for working in the IDE is supported.
Can use USB from inside the container.
Requires some setup. See readme for installation instructions.
MIT License
Need to test this still myself, but just wanted to share here, might just as well.
Posted in the microchip forums by the creator:
Dockerfile for MPLAB X IDE/IPE and toolchains

How can I access my WSL2 files from my natively installed Ubuntu?

I'm really new to Ubuntu and WSL.
My problem is simple: I want to access from Ubuntu which I have installed in my computer (dual boot alongside with Windows) to my WSL2 filesystem that I have in Windows. I located a file named ext4.vhdx which I suppose is my entire wsl drive, but I'm not really sure, it is in
c:\Users\USER\Appdata\Local\Packages\CanonicalGroupLimited.Ubuntu20.04o...\LocalState\
I'm currently into web development and I want to share that environment within WSL2 and Ubuntu, I noticed that using the linux fs is way faster than windows fs and it works better with things like watchers. So, is it possible?
I'm currently running Windows 10 19041 (2004), Ubuntu LTS 20.04
I've also encountered similar issues when doing this WSL Ubuntu sharing thing, and I've finally found a solution on the internet that works out perfectly.
Reference Link:
https://www.nicholasmelnick.com/2020/07/sharing-your-wsl2-environment-with-linux/
So basically these are the steps,
First of all, the WSL's "ext4.vhdx" file should be accessible inside your Ubuntu system (So you must mount your windows drive inside your linux OS)
Install libguestfs-tools package with APT
And finally just create a folder and guestmount the drive with following commands.
$ sudo mkdir -p /mnt/wsl
$ sudo guestmount -o allow_other \
--add /mnt/c/Users/username/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/ext4.vhdx \
-i /mnt/wsl
And done! Hope this would solve your problem. :)

QXcbConnection: Could not connect to display Aborted, when installing QT on linux

I am trying to install Qt on a Linux machine remotely from a Windows machine using PuTTY.
When I run the command to install Qt on Linux I get the following error:
~/QT# ./qt-unified-linux-x64-2.0.4-online.run
QXcbConnection: Could not connect to display
Aborted
Please suggest any workaround.
You can use the software repository of that Linux distribution.
For example, if it's Debian or Ubuntu:
sudo apt-get install qtbase5-dev
But if you really want to use the installer (usually, when specific Qt version is needed), then try one of the options:
run an X server on that machine
use the --script option of the online installer (you'll have to write a script like here: https://stackoverflow.com/a/34032216/4742108), it will probably need UI anyways
see if the offline installer has an option to run without UI
refer to here: https://community.nxp.com/message/532966
maybe use the cmd "export DISPLAY=:0" and it works
Try to connect with ssh to the host machine using -X to enable X11 display:
ssh <username>#<ip> -X
aqtinstall is a good option: https://github.com/miurahr/aqtinstall
It's a simple command line tool to download and install any Qt version. It's a fork of my old qli-installer script.

Installing a .bundle file in Fedora linux

So I am using Ozone OS which is basically just fedora with a cool theme, and a lot less crap installed. I tried installing VMWare Horizon view client from here: https://my.vmware.com/web/vmware/details?downloadGroup=VIEWCLIENTS_LINUX_32&productId=421&rPId=7320
and then i renamed the file to vmware.bundle, when i make it runnable with:
chmod +x vmware.bundle
i ran the file using:
./vmware.bundle
this is what happens in my terminal
VMWare Horizon Client is an x86 application but you are trying to install it to an x64 Linux.
To run this installation, you may need to install 32-bit runtime libraries. Do you want to proceed? (yes/no)yes
Extracting VMware Installer...done.
but when i try going to the application menu, I can find VMware anywhere
There is really no such thing as ".bundle" files on Fedora. The only format for installable software on Fedora are RPM files.
All that this ".bundle" file appears to be, is the vendor's custom installation script, that's all. It's not any kind of a standard packaging format, of any kind.
You will be able to find a newly-installed application on your application menu only if the application correctly installed a .desktop file in the right location. If this installation script did not do so, you won't get anything in the application menu.
It is the application script's responsibility to install a .desktop file in order for the application to appear in the application menu.
try running /bin/vmware
that is the default install location

Resources