How might I run a linux binary on Ghost?

Post your general questions or comments about GhostBSD here!
Post Reply
nevets
Posts: 163
Joined: Tue Jun 23, 2020 3:54 am

How might I run a linux binary on Ghost?

Post by nevets »

For the first time I find myself in the situation of needing to run a linux app in freebsd.
I have the binary.
I have started the linux service.
# service linux start
What do I do next to execute the binary?
Do I move it to /compat/linux?
Do I run the app with
# sudo linux appname?
The manual [https://docs.freebsd.org/en/books/handbook/linuxemu/] states "... can be started in the same way native FreeBSD binaries can",
which is how exactly ?
User avatar
neville
Developer
Posts: 144
Joined: Fri Aug 13, 2021 10:27 am
Location: Japan

Re: How might I run a linux binary on Ghost?

Post by neville »

Perhaps start it by command line?

For example to start Firefox in FreeBSD you type in the terminal

firefox

Perhaps something similar for your app?
nevets
Posts: 163
Joined: Tue Jun 23, 2020 3:54 am

Re: How might I run a linux binary on Ghost?

Post by nevets »

Hmm.. running the application I get:
ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2
zsh: abort
Is there a suite of "userland"linux pkgs I need to install too?
mameko
Posts: 9
Joined: Tue Oct 15, 2024 6:04 am

Re: How might I run a linux binary on Ghost?

Post by mameko »

You can look into the FreeBSD handbook, how to install a linux system within BSD. But I used a different solution.
A "quick and dirty" way is to install the Linux browser installer from Github: https://github.com/mrclksr/linux-browser-installer
I installed a browser and a little Ubuntu system is installed after that as well. Ubuntu Focal.
I opened a terminal and and updated the whole system with:

Code: Select all

sudo chroot /compat/ubuntu /bin/bash

Code: Select all

apt update && apt dist-upgrade
I repeat this every week to have an updates Linux browser. I chose Brave, so I can watch DRM-videos like from Netflix.
Now you can install your needed Linux software and it maybe work.

I could also upgrade this Ubuntu to Jammy without issues.

I hope, it works for you.
Post Reply