Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Better document which Linux Shared libraries need to be installed #4010

Merged
merged 12 commits into from
Jun 17, 2024
56 changes: 10 additions & 46 deletions packages/docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -16,7 +16,10 @@ To use Remotion, you need at least [Node](https://nodejs.org/en/download/) <MinN

## Scaffolding a new project

You can initialize a new Remotion video using
:::note
🐧 [Linux distros need at least version 2.34 of Libc.](https://github.com/remotion-dev/remotion/issues/2439)
They also need to [install some additional packages](/docs/miscellaneous/linux-dependencies).
:::

<Tabs
defaultValue="npm"
@@ -29,30 +32,30 @@ values={[
}>
<TabItem value="npm">

```bash
```bash title="Use npm as the package manager"
npx create-video@latest
```

</TabItem>
<TabItem value="pnpm">

```bash
```bash title="Use pnpm as the package manager"
pnpm create video
```

</TabItem>

<TabItem value="yarn">

```bash
```bash title="Use Yarn as the package manager"
yarn create video
```

</TabItem>

<TabItem value="bun">

```bash
```bash title="Use Bun as the package manager and runtime"
bun create video
```

@@ -63,56 +66,17 @@ Bun as a runtime is mostly supported. [Read more here](/docs/bun).
</TabItem>
</Tabs>

Choose the template that is most suitable for you. For your first project, we recommend the [Hello World](/templates/hello-world) template.
Choose the template that is most suitable for you.
For your first project, we recommend the [Hello World](/templates/hello-world) template.

After the project has been scaffolded, we recommend to open the project in your text editor and starting the [Remotion Studio](/docs/studio):

```bash
npm start
```

<details>

<summary>
Additional information for Linux users

</summary>
Linux users need to install some additional packages to get Chrome/Puppeteer working correctly.
<Tabs
defaultValue="arch"
values={[
{ label: 'Arch Linux', value: 'arch', },
{ label: 'Ubuntu and Debian', value: 'ubuntu', },
]
}>

<TabItem value="arch">

```bash
pacman -S dconf alsa-lib atk glibc cairo libcups dbus expat fontconfig gcc gdk-pixbuf2 glib2 gtk3 nspr pango gcc-libs libx11 libxcomposite libxcursor libxdamage libxext libxfixes libxi libxrandr libxrender libxss libxtst ca-certificates ttf-liberation libappindicator-gtk3 nss lsb-release xdg-utils wget mesa
```

</TabItem>
<TabItem value="ubuntu">

```bash
apt install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget libgbm-dev
```

:::note
Watch out for `apt` wanting to uninstall critical packages (e.g the Desktop) in order to install the Remotion dependencies. Abort the installation and seek help [in our Discord](https://remotion.dev/discord) if that happens!
:::

</TabItem>

</Tabs>

Linux distros that use libc need at least version 2.31 of it. [Check here](https://github.com/remotion-dev/remotion/issues/2439) if your distro has it.

Got instructions for more Linux distributions? [Add them to this page](https://github.com/remotion-dev/remotion/edit/main/packages/docs/docs/getting-started.md)!

</details>

## Installation in existing projects

Want to install Remotion in an existing project? Go here instead: [Installation in existing projects](/docs/brownfield)
2 changes: 1 addition & 1 deletion packages/docs/docs/miscellaneous/linux-dependencies.mdx
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ title: Linux Dependencies
crumb: "FAQ"
---

If you are on Linux, Chrome requires some shared libraries to be installed.
If you are on Linux, Chrome Headless Shell requires some shared libraries to be installed.

## Ubuntu

2 changes: 1 addition & 1 deletion packages/docs/docs/troubleshooting/browser-launch.mdx
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ it means the browser was not able to start. The most common reasons are

## Missing shared libraries

Visit the [installation docs](/docs/) and make sure you installed the libraries outlined in "Additional information for Linux users".
Install the [missing shared libraries for your OS](/docs/miscellaneous/linux-dependencies).

## Wrong OS or architecture

2 changes: 1 addition & 1 deletion packages/renderer/src/browser/BrowserRunner.ts
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@ function waitForWSEndpoint(

return new Promise((resolve, reject) => {
browserStderr.addListener('data', onData);
browserProcess.addListener('close', onClose);
browserStderr.addListener('close', onClose);
const listeners = [
() => browserStderr.removeListener('data', onData),
() => browserStderr.removeListener('close', onClose),