1"use strict";(self.webpackChunksunnyvalley=self.webpackChunksunnyvalley||[]).push([[9353],{28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var i=t(296540);const s={},l=i.createContext(s);function r(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(l.Provider,{value:n},e.children)}},548832:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"resources/linux/how-to-configure-linux-binary-compatibility-on-freebsd","title":"How to Configure Linux Binary Compatibility on FreeBSD?","description":"How to Configure Linux Binary Compatibility on FreeBSD?","source":"@site/docs/resources/linux/how-to-configure-linux-binary-compatibility-on-freebsd.md","sourceDirName":"resources/linux","slug":"/freebsd-tutorials/how-to-configure-linux-binary-compatibility-on-freebsd","permalink":"/docs/freebsd-tutorials/how-to-configure-linux-binary-compatibility-on-freebsd","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedBy":"Zenarmor","lastUpdatedAt":1724889600000,"frontMatter":{"id":"how-to-configure-linux-binary-compatibility-on-freebsd","description":"How to Configure Linux Binary Compatibility on FreeBSD?","title":"How to Configure Linux Binary Compatibility on FreeBSD?","slug":"/freebsd-tutorials/how-to-configure-linux-binary-compatibility-on-freebsd","sidebar_label":"How to Configure Linux Binary Compatibility on FreeBSD?","last_update":{"date":"08/29/2024","author":"Zenarmor"}},"sidebar":"Resources","previous":{"title":"How to Configure FreeBSD Kernel?","permalink":"/docs/freebsd-tutorials/how-to-configure-freebsd-kernel"},"next":{"title":"How to Configure OpenSSL and OpenSSH on FreeBSD?","permalink":"/docs/freebsd-tutorials/how-to-configure-openssl-and-openssh-on-freebsd"}}');var s=t(474848),l=t(28453);const r={id:"how-to-configure-linux-binary-compatibility-on-freebsd",description:"How to Configure Linux Binary Compatibility on FreeBSD?",title:"How to Configure Linux Binary Compatibility on FreeBSD?",slug:"/freebsd-tutorials/how-to-configure-linux-binary-compatibility-on-freebsd",sidebar_label:"How to Configure Linux Binary Compatibility on FreeBSD?",last_update:{date:"08/29/2024",author:"Zenarmor"}},o="How to Configure Linux Binary Compatibility on FreeBSD?",a={},c=[{value:"What is the Importance of Binary Compatibility?",id:"what-is-the-importance-of-binary-compatibility",level:2},{value:"What is the Disadvantage of Recompiling?",id:"what-is-the-disadvantage-of-recompiling",level:3},{value:"What is the Benefit of Binary Compatibility?",id:"what-is-the-benefit-of-binary-compatibility",level:3},{value:"What is Linux Binary Compatibility on FreeBSD?",id:"what-is-linux-binary-compatibility-on-freebsd",level:2},{value:"How to Enable Linux Binary Compatibility?",id:"how-to-enable-linux-binary-compatibility",level:2},{value:"How to Install CentOS Base System from FreeBSD Packages?",id:"how-to-install-centos-base-system-from-freebsd-packages",level:2},{value:"How to Install Debian / Ubuntu Base System with debootstrap?",id:"how-to-install-debian--ubuntu-base-system-with-debootstrap",level:2},{value:"How to Remove Ubuntu base system and Linux Binary Compatibility from FreeBSD?",id:"how-to-remove-ubuntu-base-system-and-linux-binary-compatibility-from-freebsd",level:3},{value:"What is the Advanced Linux Compatibility Topics?",id:"what-is-the-advanced-linux-compatibility-topics",level:2},{value:"How to Install Additional Libraries Manually?",id:"how-to-install-additional-libraries-manually",level:3},{value:"How to Brand Linux ELF Binaries?",id:"how-to-brand-linux-elf-binaries",level:2},{value:"How to Install a Linux RPM Based Application?",id:"how-to-install-a-linux-rpm-based-application",level:2},{value:"How to Configure the Hostname Resolver?",id:"how-to-configure-the-hostname-resolver",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components},{CtaButton:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("CtaButton",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"how-to-configure-linux-binary-compatibility-on-freebsd",children:"How to Configure Linux Binary Compatibility on FreeBSD?"})}),"\n",(0,s.jsxs)("div",{className:"date-time",children:["Published on: ",(0,s.jsx)("time",{dateTime:"2023-01-21",children:" January 21, 2023 "})," ",(0,s.jsx)("div",{className:"point",children:"."}),(0,s.jsx)("span",{className:"reading-time",children:"10 min read"}),(0,s.jsx)("div",{class:"point",children:"."}),(0,s.jsx)("a",{href:"https://www.zenarmor.com/docs/de/freebsd-tutorials/wie-man-die-linux-binarkompatibilitat-unter-freebsd-konfiguriert",children:"For German Version"})]}),"\n",(0,s.jsx)(n.p,{children:"Binary compatibility exists between two distinct computing environments if source code
1compiled into a binary for one environment also executes flawlessly in the other environment. This indicates that the developer will not be required to recompile the code to effectively execute it in a different environment."}),"\n",(0,s.jsx)(n.p,{children:"FreeBSD offers optional binary compatibility with Linux, enabling users to install and execute Linux binaries without modification. The architectures i386, amd64, and arm64 are supported."}),"\n",(0,s.jsxs)(n.p,{children:["Some Linux-specific operating system features are not yet implemented on FreeBSD. This is often the case with hardware-specific or system management-related capabilities, such as ",(0,s.jsx)(n.code,{children:"cgroups"})," or ",(0,s.jsx)(n.code,{children:"namespaces"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"After completing this tutorial, you will understand:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"What is the Importance of Binary Compatibility"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"How to achieve binary compatibility with Linux on FreeBSD"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"How to install more shared libraries for Linux"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"How to install Linux programs on a FreeBSD operating system"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"The Linux compatibility implementation details in FreeBSD"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"what-is-the-importance-of-binary-compatibility",children:"What is the Importance of Binary Compatibility?"}),"\n",(0,s.jsx)(n.p,{children:"There are two ways to examine the importance of binary compatibility. If you are developing software for a single, specific purpose, you will want to avoid recompiling a large codebase to accommodate a change in the environment."}),"\n",(0,s.jsx)(n.p,{children:"You may be using commercially available software that has been tested on a specific operating system, but which may or may not function on a variant of that operating system (such as another Linux distribution). You are unable to recompile the code, and your environment may differ from that in which the vendor tested the program."}),"\n",(0,s.jsx)(n.h3,{id:"what-is-the-disadvantage-of-recompiling",children:"What is the Disadvantage of Recompiling?"}),"\n",(0,s.jsx)(n.p,{children:"In some cases, recompiling may be a viable solution, but it may not be practicable when dealing with complex applications that must support multiple environments. In such situations, repetitive recompilation has the following drawbacks:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Time-consuming and difficult"}),": When a distinct environment lacks binary compatibility, a number of issues may arise. These issues may involve files in separate locations or libraries with minor differences. Consequently, considerable time, effort, and knowledge are required to ensure that the new binary functions accurately in the new environment."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Necessitate specialized skills"}),": Recompiling introduce new flaws or errors that were not present in the original version, particularly if the underlying architecture or platform has been modified. Moreover, recompiling can be costly, particularly for organizations that use in-house developed custom software solutions."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"what-is-the-benefit-of-binary-compatibility",children:"What is the Benefit of Binary Compatibility?"}),"\n",(0,s.jsx)(n.p,{children:"Having knowledge that an alternative environment is binary compatible provides assurance that compiled executables, whether developed in-house or provided by a vendor, will execute without issue in the target environment. Binary compatibility reduces the need for recompiling by allowing software updates to occur without modifying dependent code. This saves time and resources and streamlines the process of updating software."}),"\n",(0,s.jsx)(n.p,{children:"Nonetheless, a number of circumstances can cast doubt on binary compatibility. For example, when a new version of an operating system is released, concerns arise about whether extant applications will continue to operate seamlessly, indicating if the OS is binary compatible."}),"\n",(0,s.jsx)(n.p,{children:"Similarly, presume an organization's preferred operating system reaches its end-of-life stage. In such a circumstance, it is essential to have an alternative binary-compatible operating system available to avoid the need for recompilation or application switching. Therefore, it is essential to consider binary compatibility when evaluating the OS strategy of an organization."}),"\n",(0,s.jsx)(n.h2,{id:"what-is-linux-binary-compatibility-on-freebsd",children:"What is Linux Binary Compatibility on FreeBSD?"}),"\n",(0,s.jsx)(n.p,{children:"Linux binary compatibility, sometimes known as Linuxulator, enables FreeBSD to execute unmodified Linux binaries. Linuxulator was first motivated by the desire to play Doom on FreeBSD. From its origins in FreeBSD 2.1 (1995, for those keeping track at home), the compatibility tool is currently used by desktop applications such as Steam, Tor, and Firefox, as well as server workloads such as databases, programming languages, and caches."}),"\n",(0,s.jsx)(n.p,{children:"Linuxulator does not use virtual machines or emulation; rather, it delivers binaries with kernel interfaces equivalent to those of a genuine Linux kernel. Technically, it is comparable to the manner in which 32-bit FreeBSD binaries operate on 64-bit FreeBSD kernel."}),"\n",(0,s.jsx)(n.p,{children:"There are two primary methods for using Linuxulator:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["First, Linux software given as FreeBSD ports and packages are installed using the ",(0,s.jsx)(n.code,{children:"pkg"})," command."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Second, LinuxJails offers a complete Debian/Ubuntu user space."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The former offers fewer apps but is more user-friendly. The second w
1ay is more laborious, but useful for development work. Both may be used simultaneously."}),"\n",(0,s.jsx)(n.p,{children:"FreeBSD claims compatibility with Linux 3.2.0 in 12-STABLE and 4.4.0 in 14-CURRENT."}),"\n",(0,s.jsx)(n.p,{children:"Here is a collection of Linux apps used to test linux(4) on amd64 under 13-STABLE and 14-CURRENT, often inside an Ubuntu chroot environment. In general, it contains bigger chunks of code, ideally those having an accessible test suite."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"App"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Package"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Arch"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Distribution"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Notes"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"adom"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"adom_linux_ubuntu_64_3.3.3"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Installed from tarball"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"apt"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"apt-1.6.12ubuntu0.1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Need to add APT::Cache-Start 251658240; to /etc/apt/apt.conf.d/00aptitude."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Apache HTTPD"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"apache2-2.4.29-1ubuntu4.13"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'"unsupported setsockopt level 6 optname 9" (TCP_DEFER_ACCEPT)'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Brave"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"brave-browser-1.20.103 : chromium:88.0.4324.152"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"It works. But, there're some warnings: getsockopt, socket AF_NETLINK. It was tested with following flags: --no-sandbox --no-zygote --test-type --v=0"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BusyBox"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"busybox-static-1:1.27.2-2ubuntu3.2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"BusyBox"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"busybox-static-1:1.30.1-4ubuntu6"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"arm64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Chrome"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"google-chrome-stable-87.0.4280.88-1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.5 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'Requires "--no-sandbox --no-zygote --in-process-gpu" options; "--no-zygote" required for Widevine.'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Chromium"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"chromium-browser87.0.4280.66-0ubuntu0.18.04.1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.5 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'Requires "--no-sandbox --no-zygote --in-process-gpu" options; "--no-zygote" required for Widevine'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Dwarf Fortress"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"dwarf-fortress-0.47.04-1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'Installed with "apt install dwarf-fortress"; the one from tarball has some problem with SDL libraries'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Element messenger"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"element-desktop-1.7.21"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"It works. But, there're some warnings: getsockopt, socket AF_NETLINK. It was tested with following flags: --no-sandbox --no-zygote --test-type --v=0"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"EMACS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"emacs25-25.2+1-6"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Firefox"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"firefox-77.0.1+build1-0ubuntu0.18.04.1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Works on 13-CURRENT since r367288"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Firestorm Viewer"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Phoenix_Firestorm-Releasex64_x86_64_6.3.9.58205"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04.1 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Works with Intel graphics. Does not work with Nvidia unless you can patch linux-nvidia-libs or something"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"glxgears"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"mesa-utils-8.4.0-1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Requires at least drm-devel-kmod-5.4.62.g20201109, otherwise crashes immediately"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"golang"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"golang-2:1.13~1ubuntu2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04.3 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"To test: cd /usr/share/go/test && go run run.go -v"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"grep"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"grep-3.1-2build1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"irssi"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"irssi-1.0.5-1ubuntu4.2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Konsole"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"konsole-4:17.12.3-1ubuntu1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Requires /home and /net nullfs mounts; \"ioctl fd=9, cmd=0x5441 ('T',65) is not implemented\""})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"mc"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"mc-3:4.8.19-1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ioctl fd=0, cmd=0x541c ('T',28) is not implemented"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Mathematica"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Mathematica_12.1.1_LINUX.sh"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"MariaDB"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"mariadb-server-10.1-1:10.1.44-0ubuntu0.18.04.1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Logs warnings about innodb_use_native_aio not being supported (missing io_setup(2)) and being unable to set thread nice (probably because Linux syscalls.master simply calls native setpriority(2), which doesn't look up Linux TIDs)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Mongo"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"mongodb-1:3.6.3-0ubuntu1.1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Seems to work fine, apart from a \"Error checking directory '/sys/block': No such file or directory\" in logs"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"MySQL"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"mysql-server-5.7-5.7.30-0ubuntu0.18.04.1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Logs warnings (fallocate(32, FALLOC_FL_PUNCH_HOLE"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"nethack"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"nethack-console-3.6.0-4"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"nethack"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"nethack-console-3.6.1-1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"arm64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ninja"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ninja-build-1.10.0-1build1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"arm64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"All 362 tests pass"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Node.js"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"nodejs-8.10.0~dfsg-2ubuntu0.4"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'Seems to work fine, however "make test" results are still TBD, at some point the googletest-based V8 regression tests seem to hang on epoll_wait(2) just after EnvironmentTest.ExitHandlerTest'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"OpenJDK"}),(0,s.jsxs)(n.td,{style:{textAlign:"center"}
1,children:["openjdk-11-jre-headless",":amd64-11",".0.7+10-2ubuntu2~18.04"]}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"PostgreSQL"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"postgresql-12.3"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'Installed from tarball, so that regression tests (make check) can be run; "All 192 tests passed."'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"PostgreSQL"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"postgresql-13.3"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"arm64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:'Installed from tarball, so that regression tests (make check) can be run; "All 201 tests passed."'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Python"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"python3-3.6.7-1~18.04"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"11 test failures, one hang; to test: apt install libpython3.6-testsuite && python3.6 -m test -vW -x test_socket; you will probably need to install missing Python modules as needed"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Python"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"python3-3.8.2-1ubuntu1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"arm64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"387 tests OK, 12 tests failed, 22 tests skipped"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Redis"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"redis-5:5.0.7-2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ripcord"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ripcord-0.4.26"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Need to unpack AppImage bundle but can run binary as expected"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"screen"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"screen-4.6.2-1ubuntu1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Spotify"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"spotify-client-1:1.1.42.622.gbd112320-37"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.5 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"AlsaDriver Thread process consumes lots of CPU"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Spotify"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"spotify-client-1.1.42.622.gbd112320"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"It works. But, there're some warnings: getsockopt and socket AF_NETLINK"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ssh"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"openssh-client-1:7.6p1-4ubuntu0.3"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"sshd"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}
1,children:"openssh-server-1:7.6p1-4ubuntu0.3"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Missing keyctl(2), setfsgid(2); ioctl fd=4, cmd=0x5441 ('T',65) is not implemented"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"sudo"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"sudo-1.8.21p2-3ubuntu1.2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"tmux"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"tmux-2.6-3ubuntu0.2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"There is a weird interaction between FreeBSD and Linux instances running at the same time; ioctl fd=8, cmd=0x5441 ('T',65) is not implemented"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Toontown Rewritten"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"ttr-live-v2.6.8"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04.1 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Works with Intel graphics, does not work with Nvidia unless we can get the linux-nvidia-libs port to work with Ubuntu userlands. AMD graphics are untested. Some things do not render correctly."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Vim"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"vim-2:8.0.1453-1ubuntu1.3"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 18.04.4 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Vivaldi"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"vivaldi-stable_3.4.2066.106-1_amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04.1 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"}})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"X-AIR-Edit"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"X-AIR-Edit_LINUX_V1.7"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"amd64"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Ubuntu 20.04.01 LTS"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"Fixed around 7a718f293a1"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Table 1."})," ",(0,s.jsx)(n.em,{children:"Linux Apps tested under FreeBSD 13-STABLE and 14-CURRENT"})]}),"\n",(0,s.jsx)(t,{}),"\n",(0,s.jsx)(n.h2,{id:"how-to-enable-linux-binary-compatibility",children:"How to Enable Linux Binary Compatibility?"}),"\n",(0,s.jsxs)(n.p,{children:["Linux binary compatibility is not enabled on FreeBSD by default. To enable Linux binary compatibility at boot time, you must run the next command to add the line to ",(0,s.jsx)(n.code,{children:"/etc/rc.conf"})," the configuration file:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"echo 'linux_enable=\"YES\"' >> /etc/rc.conf\n"})}),"\n",(0,s.jsx)(n.p,{children:"After enabling Linux binary compatibility on your FreeBSD, you may start it without rebooting by running the next command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"service linux start\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Under ",(0,s.jsx)(n.code,{children:"/compat/linux"}),", the ",(0,s.jsx)(n.code,{children:"/etc/rc.d/linux"})," script will load essential kernel modules and mount filesystems requested by Linux programs. It is sufficient for statically linked Linux binaries to function. They are launched similarly to native FreeBSD binaries. They perform almost identically to native processes and can be traced and debugged as normal."]}),"\n",(0,s.jsxs)(n.p,{children:["This is analogous to how 32-bit binaries cannot use 64-bit native libraries. One may transfer these libraries from an existing Linux installation with the same architecture, install them from FreeBSD packages, or install them using ",(0,s.jsx)(n.code,{children:"debootstrap"})," (from ",(0,s.jsx)(n.code,{children:"sysutils/debootstrap"}),"), among other methods."]}),"\n",(0,s.jsx)(n.h2,{id:"how-to-install-centos-base-system-from-freebsd-packages",children:"How to Install CentOS Base System from FreeBSD Packages?"}),"\n",(0,s.jsxs)(n.p,{children:["The simplest method for installing Linux libraries is to install the ",(0,s.jsx)(n.code,{children:"emulators/linux_base-c7"})," package or port, which sets the CentOS 7-derived base system in ",(0,s.jsx)(n.code,{children:"/compat/linux"}),". You may follow the steps given below:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Install the ",(0,s.jsx)(n.code,{children:"emulators/linux_base-c7"})," package by running next command :"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"pkg install linux_base-c7\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see the output similar to the given below:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'Updating FreeBSD repository catalogue...\nFetching packagesite.pkg: 100% 6 MiB 2.3MB/s 00:03\nProcessing entr
1ies: 100%\nFreeBSD repository update completed. 32289 packages processed.\nAll repositories are up to date.\nThe following 1 package(s) will be affected (of 0 checked):\nNew packages to be INSTALLED:\nlinux_base-c7: 7.9.2009_1\n\nNumber of packages to be installed: 1\n\nThe process will require 232 MiB more space.\n35 MiB to be downloaded.\n\nProceed with this action? [y/N]: y\n\n[1/1] Fetching linux_base-c7-7.9.2009_1.pkg: 100% 35 MiB 2.5MB/s 00:15\nChecking integrity... done (0 conflicting)\n[1/1] Installing linux_base-c7-7.9.2009_1...\n[1/1] Extracting linux_base-c7-7.9.2009_1: 100%\n=====\nMessage from linux_base-c7-7.9.2009_1:\n--\nSome programs need linprocfs mounted on /compat/linux/proc. Add the\nfollowing line to /etc/fstab:\n\nlinprocfs /compat/linux/proc linprocfs rw 0 0\nThen run "mount /compat/linux/proc".\nSome programs need linsysfs mounted on /compat/linux/sys. Add the\nfollowing line to /etc/fstab:\n\nlinsysfs /compat/linux/sys linsysfs rw 0 0\n\nThen run "mount /compat/linux/sys".\n\nSome programs need tmpfs mounted on /compat/linux/dev/shm. Add the\nfollowing line to /etc/fstab:\n\ntmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0\n\nThen run "mount /compat/linux/dev/shm".\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["You may add the following lines to ",(0,s.jsx)(n.code,{children:"/etc/fstab"})," to support ",(0,s.jsx)(n.code,{children:"linprocfs"}),", ",(0,s.jsx)(n.code,{children:"linsysfs"}),", and ",(0,s.jsx)(n.code,{children:"tmpfs"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"linprocfs /compat/linux/proc linprocfs rw 0 0\nlinsysfs /compat/linux/sys linsysfs rw 0 0\ntmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To mount ",(0,s.jsx)(n.code,{children:"linprocfs"}),", ",(0,s.jsx)(n.code,{children:"linsysfs"}),", and ",(0,s.jsx)(n.code,{children:"tmpfs"})," run the next commands:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"mount /compat/linux/proc\nmount /compat/linux/sys\nmount /compat/linux/dev/shm\n"})}),"\n",(0,s.jsx)(n.p,{children:"FreeBSD offers packages for several binary Linux programs. You may execute the following command to install Sublime Text 4, along with all the Linux libraries it requires:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"pkg install linux-sublime-text4\n"})}),"\n",(0,s.jsx)(n.p,{children:"You may see the output similar to the following one:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'Updating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\nThe following 90 package(s) will be affected (of 0 checked):\n\nNew packages to be INSTALLED:\nadwaita-icon-theme: 40.1.1\nat-spi2-core: 2.44.1\natk: 2.38.0\n......................................\nwayland: 1.21.0\nxkeyboard-config: 2.34_2\nxorg-fonts-truetype: 7.7_1\nxorgproto: 2022.1\n\nNumber of packages to be installed: 90\n\nThe process will require 527 MiB more space.\n134 MiB to be downloaded.\n\nProceed with this action? [y/N]: y\n[1/90] Fetching linux-c7-cairo-gobject-1.15.12_1.pkg: 100% 13 KiB 13.7kB/s 00:01\n[2/90] Fetching libxcb-1.15.pkg: 100% 1 MiB 1.1MB/s 00:01\n[3/90] Fetching linux-c7-libxkbcommon-0.7.1_1.pkg: 100% 159 KiB 163.0kB/s 00:01\n[4/90] Fetching linux-c7-cyrus-sasl-lib-2.1.26_5.pkg: 100% 170 KiB 174.1kB/s 00:01\n[5/90] Fetching libglvnd-1.6.0.pkg: 100% 343 KiB 351.3kB/s 00:01\n[6/90] Fetching libpthread-stubs-0.4.pkg: 100% 2 KiB 2.0kB/s 00:01\n[7/90] Fetching linux-c7-fribidi-1.0.2_1.pkg: 100% 79 KiB 80.5kB/s 00:01\n......................\n[88/90] Extracting linux-c7-gtk3-3.22.30_4: 100%\n[89/90] Installing desktop-file-utils-0.26_1...\n[89/90] Extracting desktop-file-utils-0.26_1: 100%\nBuilding cache database of MIME types\n[90/90] Installing linux-sublime-text4-4142...\n[90/90] Extracting linux-sublime-text4-4142: 100%\nBuilding cache database of MIME types\nCompiling glib schemas\nNo sc
1hema files found: doing nothing.\nGenerating gdk-pixbuf modules cache\nBuilding the Shared MIME-Info database cache\nRunning fc-cache to build fontconfig cache...\nGenerating GIO modules cache\nGenerating GTK icon cache for /usr/local/share/icons/hicolor\nGenerating GTK icon cache for /usr/local/share/icons/Adwaita\n=====\nMessage from wayland-1.21.0:\n--\nWayland requires XDG_RUNTIME_DIR to be defined to a path that will\ncontain "wayland-%d" unix(4) sockets. This is usually handled by\nconsolekit2 (via ck-launch-session) or pam_xdg (via login).\n=====\nMessage from linux-c7-dri-18.3.4_4:\n--\nThis package needs linsysfs mounted on /compat/linux/sys. Add the\nfollowing line to /etc/fstab:\n\nlinsysfs /compat/linux/sys linsysfs rw 0 0\n\nThen run "mount /compat/linux/sys".\n=====\nMessage from libxkbcommon-1.4.1:\n--\nIf arrow keys don\'t work under X11 switch to legacy rules e.g.,\n\nFor sh/bash/ksh/zsh run and (optionally) add into ~/.profile:\nexport XKB_DEFAULT_RULES=xorg\n\nFor csh/tcsh run and (optionally) add into ~/.login:\nsetenv XKB_DEFAULT_RULES xorg\n=====\nMessage from dejavu-2.37_1:\n\n--\nMake sure that the freetype module is loaded. If it is not, add the following line to the "Modules" section of your X Windows configuration file:\n\nLoad "freetype"\n\nAdd the following line to the "Files" section of X Windows configuration file:\nFontPath "/usr/local/share/fonts/dejavu/"\n\nNote: your X Windows configuration file is typically /etc/X11/XF86Config if you are using XFree86, and /etc/X11/xorg.conf if you are using X.Org.\n'})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"how-to-install-debian--ubuntu-base-system-with-debootstrap",children:"How to Install Debian / Ubuntu Base System with debootstrap?"}),"\n",(0,s.jsxs)(n.p,{children:["Using ",(0,s.jsx)(n.code,{children:"sysutils/debootstrap"})," is an alternate method for delivering Linux shared libraries. This offers the benefit of a complete Debian or Ubuntu distribution."]}),"\n",(0,s.jsx)(n.p,{children:"Debootstrap is used to install Ubuntu on a machine without the need for an installation DVD, as well as run a different Ubuntu flavor under a chroot environment. This allows you to generate a complete (minimum) Ubuntu system for testing purposes. By executing SCRIPT, debootstrap bootstraps a minimal Ubuntu system of SUITE into TARGET from MIRROR."}),"\n",(0,s.jsx)(n.p,{children:"You may follow the instructions to install Debian/Ubuntu base system on your FreeBSD 13 node:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Enable Linux binary compatibility by running the following commands:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"echo 'linux_enable=\"YES\"' >> /etc/rc.conf\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To make the Linux binary compatibility settings permanent configure the FreeBSD system bootstrap configuration file",(0,s.jsx)(n.code,{children:"/boot/loader.conf"})," as given below:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'linux_load="YES"\nlinux64_load="YES"\nfdescfs_load="YES"\nlinprocfs_load="YES"\ntmpfs_load="YES"\nlinsysfs_load="YES"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Write a command script for starting and stopping the Ubuntu basic system by running the next commands."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"touch /usr/local/etc/rc.d/ubuntu\nchmod +x /usr/local/etc/rc.d/ubuntu\nnano /usr/local/etc/rc.d/ubuntu\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Add the following shell script lines into the script:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'#!/bin/sh\n#\n# PROVIDE: ubuntu\n# REQUIRE: archdep mountlate\n# KEYWORD: nojail\n#\n. /etc/rc.subr\nname="ubuntu"\ndesc="Ubuntu for FreeBSD Linux Binary Compatibility"\nrcvar="ubuntu_enable"\nstart_cmd="${name}_start"\nstop_cmd=":"\n\nunmounted()\n{\n[ `stat -f "%d" "$1"` == `stat -f "%d" "$1/.."` -a `stat -f "%i" "$1"` != `stat -f "%i" "$1/.."` ]\n}\n\nubuntu_start()\n{\nlocal _tmpdir\nload_kld -e \'linux(aout|elf)\' linux\ncase `sysctl -n hw.machine_arch` in\namd64)\nload_kld -e \'linux64elf\' linux64\n;;\nesac\nif [ -x "/compat/ubuntu/sbin/ldconfigDisabled" ]; then\n_tmpdir=`mktemp -d -t linux-ldconfig`\n/compat/ubuntu/sbin/ldconfig -C ${_tmpdir}/ld.so.cache\nif ! cmp -s "${_tmpdir}/ld.so.cache" "/compat/ubuntu/etc/ld.so.cache"; then\ncat "${_tmpdir}/ld.so.cache" > "/compat/ubuntu/etc/ld.so.cache"\nfi\nrm -rf ${_tmpdir}\nfi\nload_kld pty\nif [ `sysctl -ni kern.elf64.fallback_brand` -eq "-1" ]; then\nsysctl kern.elf64.fallback_brand=3 > /dev/null\nfi\nif [ `sysctl -ni kern.elf32.fallback_brand` -eq "-1" ]; then\nsysctl kern.elf32.fallback_brand=3 > /dev/null\nfi\nsysctl compat.linux.emul_path="/compat/ubuntu"\nunmounted "/compat/ubuntu/dev" && (mount -o nocover -t devfs devfs "/compat/ubuntu/dev" || exit 1)\nunmounted "/compat/ubuntu/dev/fd" && (mount -o nocover,linrdlnk -t fdescfs fdescfs "/compat/ubuntu/dev/fd" || exit 1)\nunmounted "/compat/ubuntu/dev/shm" && (mount -o nocover,mode=1777 -t tmpfs tmpfs "/compat/ubuntu/dev/shm" || exit 1)\nunmounted "/compat/ubuntu/home" && (mount -t nullfs /home "/compat/ubuntu/home" || exit 1)\nunmounted "/compat/ubuntu/proc" && (mount -o nocover -t linprocfs linprocfs "/compat/ubuntu/proc" || exit 1)\nunmounted "/compat/ubuntu/sys" && (mount -o nocover -t linsysfs linsysfs "/compat/ubuntu/sys" || exit 1)\nunmounted "/compat/ubuntu/tmp" && (mount -t nullfs /tmp "/compat/ubuntu/tmp" || exit 1)\nunmounted /dev/fd && (mount -o nocover -t fdescfs fdescfs /dev/fd || exit 1)\nunmounted /proc && (mount -o nocover -t procfs procfs /proc || exit 1)\ntrue\n}\n\nload_rc_config $name\nrun_rc_command "$1"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"You may create a ZFS dataset for the directory of Linux compatibility by running the next command. This step is optional. ZFS dataset enables the usage of snapshots, the safe deleti
1on of files without crossing mountpoints, and, if required, the safe deletion of the whole volume."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"zfs create -o compression=on -o mountpoint=/compat zroot/compat\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Run the next command to create the Ubuntu operating system folders:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"mkdir -p /compat/ubuntu/{dev/fd,dev/shm,home,proc,sys,tmp}\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Enable Ubuntu chroot jail and make it automatically enabled at boot time by running next command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"sysrc ubuntu_enable=YES\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"To start Ubuntu base system in its chroot jail run the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"service ubuntu start\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will display the following output:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"compat.linux.emul_path: /compat/linux -> /compat/ubuntu\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To install ",(0,s.jsx)(n.code,{children:"debootstrap"})," that will be used to download and install Ubuntu base systems by specifying the Ubuntu target, such as jammy for Jammy Jellyfish, which is version 22.04 LTS of Ubuntu, run the next command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"pkg install debootstrap\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see the output similar to the given below:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"Updating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\nThe following 18 package(s) will be affected (of 0 checked):\nNew packages to be INSTALLED:\nbash: 5.2.15\ndebootstrap: 1.0.128\ngmp: 6.2.1\ngnugrep: 3.8\ngnupg: 2.3.8\ngnutls: 3.7.8_1\nlibassuan: 2.5.5\nlibgcrypt: 1.9.4_1\nlibgpg-error: 1.46\nlibksba: 1.6.2\nlibtasn1: 4.19.0\nnettle: 3.8.1\nnpth: 1.6\np11-kit: 0.24.1_1\npinentry: 1.2.1\npinentry-curses: 1.2.1\nsqlite3: 3.40.1,1\nubuntu-keyring: 2021.03.26\n\nNumber of packages to be installed: 18\n\nThe process will require 54 MiB more space.\n12 MiB to be downloaded.\n\nProceed with this action? [y/N]:\n[1/18] Fetching pinentry-curses-1.2.1.pkg: 100% 32 KiB 33.0kB/s 00:01\n[2/18] Fetching gnugrep-3.8.pkg: 100% 250 KiB 255.9kB/s 00:01\n-----------\n[17/18] Installing gnupg-2.3.8...\n[17/18] Extracting gnupg-2.3.8: 100%\n[18/18] Installing debootstrap-1.0.128...\n[18/18] Extracting debootstrap-1.0.128: 100%\n=====\nMessage from debootstrap-1.0.128:\n--\nTo successfully create an installation of Debian or Ubuntu debootstrap requires the following kernel modules to be loaded:\n\nlinux64 fdescfs linprocfs linsysfs tmpfs\n\nTo install Ubuntu 18.04 LTS (Bionic Beaver) into /compat/ubuntu, run as root:\n\ndebootstrap bionic /compat/ubuntu\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Run the following command to download and install ",(0,s.jsx)(n.code,{children:"Ubuntu 22.04"})," base system into Linux compatibility directory:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"debootstrap --arch=amd64 --no-check-gpg jammy /compat/ubuntu\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see the following lines at the bottom of output:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"I: Configuring python3-yaml...\nI: Configuring netplan.io...\nI: Configuring ubuntu-advantage-tools...\nI: Configuring networkd-dispatcher...\nI: Configuring kbd...\nI: Configuring console-setup-linux...\nI: Configuring console-setup...\nI: Configuring ubuntu-minimal...\nI: Configuring libc-bin...\nI: Configuring ca-certificates...\nI: Base system installed successfully.\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["If you get an ",(0,s.jsx)(n.code,{children:"Permission denied"})," error, try to run ",(0,s.jsx)(n.code,{children:"chmod 744 /usr/local/sbin/debootstrap"})," to fix the bug."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Restart Ubuntu chroot jail by running the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"service ubuntu restart\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see the following output:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"compat.linux.emul_path: /compat/ubuntu -> /compat/ubuntu\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Enter the chroot jail to confine further operations to the Ubuntu base filesystem b
1y running the next command. If Ubuntu displays a notification about a missing group ID, you may just disregard it. You'll notice that the prompt has changed."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"chroot /compat/ubuntu /bin/bash\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"You may set time zone by running the nxt command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'echo "%b\\n" "0.0 0 0.0\\n0\\nUTC" >> /etc/adjtime\ndpkg-reconfigure tzdata\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To fix ",(0,s.jsx)(n.code,{children:"apt"})," package manager, run the next command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'printf "APT::Cache-Start 251658240;" > /etc/apt/apt.conf.d/00aptitude\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"You may add repositories by running the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" >> /etc/apt/sources.list\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"To update Ubuntu packages you may run the following commands:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"apt update\napt list --upgradable\napt upgrade\napt autoremove\napt clean\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"To exit the Ubuntu chroot jail run the next command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"exit\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"You have now enabled Linux Binary Compatibility in FreeBSD and installed Ubuntu on its base system. You may install Ubuntu and Debian applications and binaries by entering the Ubuntu chroot jail and using the apt package manager."}),"\n",(0,s.jsxs)(n.p,{children:["It is possible to debootstrap into ",(0,s.jsx)(n.code,{children:"/compat/linux"}),", however it is advised to prevent file clashes with FreeBSD ports and packages. Rather, derive the directory name from the name of the distribution or version, such as ",(0,s.jsx)(n.code,{children:"/compat/ubuntu"}),". If the bootstrapped instance is meant to offer Linux shared libraries without explicitly using ",(0,s.jsx)(n.code,{children:"chroot"})," or ",(0,s.jsx)(n.code,{children:"jails"}),", the kernel may be pointed to it by modifying the ",(0,s.jsx)(n.code,{children:"compat.linux.emul_path"})," sysctl and adding the following line to ",(0,s.jsx)(n.code,{children:"/etc/sysctl.conf"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'compat.linux.emul_path="/compat/ubuntu"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["This ",(0,s.jsx)(n.code,{children:"sysctl"})," regulates the path translation mechanism of the kernel. Please note that altering it might create issues for Linux programs installed from FreeBSD packages since many of these apps are still 32-bit while Ubuntu seems to be deprecating 32-bit library support."]}
1),"\n",(0,s.jsx)(n.h3,{id:"how-to-remove-ubuntu-base-system-and-linux-binary-compatibility-from-freebsd",children:"How to Remove Ubuntu base system and Linux Binary Compatibility from FreeBSD?"}),"\n",(0,s.jsx)(n.p,{children:"The Ubuntu base system in FreeBSD's Linux Binary Compatibility may be securely erased if required by first deactivating the automatic start of Ubuntu base system, then restarting FreeBSD, and then removing the Ubuntu base system directory or destroying the ZFS volume. For added safety, it is advised removing without crossing mountpoints. FreeBSD will crash and FreeBSD disk-related services will core dump if the Ubuntu base system is running while trying to erase it."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Disable Linux binary compatibility by editing ",(0,s.jsx)(n.code,{children:"/etc/rc.conf"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'linux_enable="NO"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Remove the following lines added for enabling linux bina from ",(0,s.jsx)(n.code,{children:"/boot/loader.conf"}),"file."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'linux_load="YES"\nlinux64_load="YES"\nfdescfs_load="YES"\nlinprocfs_load="YES"\ntmpfs_load="YES"\nlinsysfs_load="YES"\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Reboot the FreeBSD node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"reboot\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Delete the Ubuntu base system by running the next commands:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"cd /compat\nrm -rf ubuntu\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"what-is-the-advanced-linux-compatibility-topics",children:"What is the Advanced Linux Compatibility Topics?"}),"\n",(0,s.jsxs)(n.p,{children:["The Linux compatibility layer is still under development on FreeBSD. Some programs need the mounting of particular filesystems. This is handled by the ",(0,s.jsx)(n.code,{children:"/etc/rc.d/linux"})," script by default, but is deactivated by adding the following line to ",(0,s.jsx)(n.code,{children:"/etc/rc.conf"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:'linux_mounts_enable="NO"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Filesystems mounted by the ",(0,s.jsx)(n.code,{children:"rc"})," script will not function for Linux processes under chroots or jails; configure them in ",(0,s.jsx)(n.code,{children:"/etc/fstab"})," if necessary:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"devfs /compat/linux/dev devfs rw,late 0 0\ntmpfs /compat/linux/dev/shm tmpfs rw,late,size=1g,mode=1777 0 0\nfdescfs /compat/linux/dev/fd fdescfs rw,late,linrdlnk 0 0\nlinprocfs /compat/linux/proc linprocfs rw,late 0 0\nlinsysfs /compat/linux/sys linsysfs rw,late 0 0\n"})}),"\n",(0,s.jsx)(n.p,{children:"Since the Linux binary compatibility layer now supports both 32-bit and 64-bit Linux binaries (on 64-bit x86 hosts), it is no longer viable to statically link emulation features into a custom kernel."}),"\n",(0,s.jsx)(n.h3,{id:"how-to-install-additional-libraries-manually",children:"How to Install Additional Libraries Manually?"}),"\n",(0,s.jsxs)(n.p,{children:["After establishing Linux binary compatibility, if a Linux program complains about missing shared libraries, discover which shared libraries the ",(0,s.jsx)(n.a,{href:"/docs/linux-tutorials/what-is-linux",children:"Linux"})," binary requires and install them manually."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"ldd"})," may be used from a Linux system with the same CPU architecture to discover which shared libraries a program requires. For instance, to see which shared libraries ",(0,s.jsx)(n.code,{children:"linuxdoom"})," requires, use the following command on a Linux system with Doom installed:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"ldd linuxdoom\nlibXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0\nlibX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0\nlibc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Then, copy all the files in the last column of the Linux system's output into ",(0,s.jsx)(n.code,{children:"/compat/linux"})," on the FreeBSD machine. Create symbolic connections to the names in the first column after copying them. This example will generate the following FreeBSD system files:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"/compat/linux/usr/X11/lib/libXt.so.3.1.0\n/compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0\n/compat/linux/usr/X11/lib/libX11.so.3.1.0\n/compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0\n/compat/linux/lib/libc.so.4.6.29\n/compat/linux/lib/libc.so.4 ->
1 libc.so.4.6.29\n"})}),"\n",(0,s.jsxs)(n.p,{children:["If a Linux shared library with a major revision number that matches the first column of the ",(0,s.jsx)(n.code,{children:"ldd"})," output already exists, it does not need to be transferred to the file mentioned in the final column, since the existing library should function. However, it is recommended to copy the shared library if it is a newer version. If the symbolic link refers to the new one, the old one may be deleted."]}),"\n",(0,s.jsx)(n.p,{children:"These libraries, for instance, already exist on the FreeBSD system:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"/compat/linux/lib/libc.so.4.6.27\n/compat/linux/lib/libc.so.4 -> libc.so.4.6.27\n"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"ldd"})," indicates that a binary needs a newer version:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Given that the current library is just one or two versions behind, the application should still function with the somewhat outdated version. However, it is safe to replace the current ",(0,s.jsx)(n.code,{children:"libc.so"})," file with the updated file:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"/compat/linux/lib/libc.so.4.6.29\n/compat/linux/lib/libc.so.4 -> libc.so.4.6.29\n"})}),"\n",(0,s.jsx)(n.p,{children:"In most cases, only the first few times a Linux software is installed on FreeBSD would it be necessary to locate the shared libraries on which Linux binaries rely. After some time, the system will have a sufficient collection of Linux shared libraries to execute freshly installed Linux binaries without further effort."}),"\n",(0,s.jsx)(n.h2,{id:"how-to-brand-linux-elf-binaries",children:"How to Brand Linux ELF Binaries?"}),"\n",(0,s.jsx)(n.p,{children:"The FreeBSD kernel utilizes many techniques to detect whether the binary to be run is a Linux binary:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"it examines the brand in the ELF file header"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"searches for known ELF interpreter routes,"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"examines ELF notes."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"By default, unbranded ELF executables are believed to be Linux. If all of these approaches fail, executing the binary may result in an error message:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"% ./my-linux-elf-binary\nELF binary type not known\nAbort\n"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"brandelf"})," enables the FreeBSD kernel to differentiate between a FreeBSD ELF binary and a Linux binary. You may run the next command for this purpose:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"brandelf -t Linux my-linux-elf-binary\n"})}),"\n",(0,s.jsx)(n.h2,{id:"how-to-install-a-linux-rpm-based-application",children:"How to Install a Linux RPM Based Application?"}),"\n",(0,s.jsxs)(n.p,{children:["Install the ",(0,s.jsx)(n.code,{children:"archivers/rpm4"})," package or port before installing an RPM-based Linux application. Once installed, root may install ",(0,s.jsx)(n.code,{children:".rpm"})," files with the following commands:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"cd /compat/linux\nrpm2cpio < /path/to/linux.archive.rpm | cpio -id\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"brandelf"})," for the installed ELF binaries if required. This will hinder a clean uninstallation."]}),"\n",(0,s.jsx)(n.h2,{id:"how-to-configure-the-hostname-resolver",children:"How to Configure the Hostname Resolver?"}),"\n",(0,s.jsx)(n.p,{children:"If DNS does not function or if the following error occurs:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'resolv+: "bind" is an invali
1d keyword resolv+:\n"hosts" is an invalid keyword\n'})}),"\n",(0,s.jsxs)(n.p,{children:["You may configure ",(0,s.jsx)(n.code,{children:"/compat/linux/etc/host"}),".conf as follows:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"order hosts, bind\nmulti on\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This indicates that ",(0,s.jsx)(n.code,{children:"/etc/hosts"})," is searched first, followed by DNS. Linux apps utilize ",(0,s.jsx)(n.code,{children:"/etc/host.conf"})," when ",(0,s.jsx)(n.code,{children:"/compat/linux/etc/host.conf"})," does not exist and complain about the incompatible FreeBSD syntax. Remove ",(0,s.jsx)(n.code,{children:"bind"})," if ",(0,s.jsx)(n.code,{children:"/etc/resolv.conf"})," is not set with a name server."]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.