Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If wkhtmltoimage exits with error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory, install the X Rendering Extension library supplied by your Linux distribution, then verify that the dynamic linker can resolve it. On Debian and Ubuntu, the normal repair is:

sudo apt update
sudo apt install libxrender1

The library is a runtime dependency of the executable, not a file that wkhtmltoimage installs itself. If the program is 32-bit, install the matching 32-bit package instead. If the library error disappears but rendering still fails on a server without a display, run the command through Xvfb or use a build with documented headless support.

What the error means

wkhtmltoimage converts an HTML input into an image using the command form wkhtmltoimage [OPTIONS]... <input file> <output file>. Before rendering starts, Linux’s dynamic linker loads every shared library required by the executable. When it cannot find the SONAME libXrender.so.1 in the configured library paths, the process stops immediately.

Ubuntu describes the provider as the “X Rendering Extension client library.” On Ubuntu Jammy, the package file list places the 64-bit files at paths such as /usr/lib/x86_64-linux-gnu/libXrender.so.1 and libXrender.so.1.3.0. Installing a package is safer than downloading a standalone .so: the package manager selects the right ABI, records ownership and receives security updates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Repair it on Debian or Ubuntu

1. Locate the executable and check its architecture

command -v wkhtmltoimage
file "$(command -v wkhtmltoimage)"

The first command shows which copy will run. The second reports whether it is an ELF 64-bit or 32-bit executable. This matters on a 64-bit host that is running a 32-bit wkhtmltoimage binary.

2. Install the matching provider package

For a normal 64-bit installation:

sudo apt update
sudo apt install libxrender1

For a 32-bit executable on a 64-bit Debian-family system, enable Debian multiarch if necessary and install the architecture-qualified package:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libxrender1:i386

Use the package architecture that matches the executable, not simply the operating system’s default architecture. If apt reports that the package cannot be found, check that the correct repositories for your release are enabled rather than copying a library from another distribution.

3. Confirm that the file is installed

dpkg -L libxrender1 | grep 'libXrender.so.1'
ldconfig -p | grep libXrender.so.1

The first command checks package ownership and the second checks the dynamic-linker cache. If the file is present on disk but absent from the cache, refresh the cache and retry:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
sudo ldconfig
ldconfig -p | grep libXrender.so.1

4. Inspect every dependency

ldd "$(command -v wkhtmltoimage)"

Look for any line ending in not found. This is more useful than fixing only the first message because wkhtmltoimage may reveal dependencies one at a time. After libXrender.so.1 is repaired, a missing libfontconfig library has been reported for some installations.

Install the rest of the runtime set when needed

Linux builds of wkhtmltopdf and wkhtmltoimage commonly rely on more than XRender. The project’s packaging information lists runtime components including:

  • fontconfig and libfreetype6 for font discovery and rasterization;
  • libx11-6, libxcb1 and libxext6 for X11 client functionality;
  • libxrender1 for the X Rendering Extension;
  • installed fonts and the appropriate C and C++ runtime libraries.

Package names vary by distribution and release. Install the native packages from your configured repositories and rerun ldd after each missing-library report. Do not copy Debian libraries into Fedora, Arch or openSUSE, and do not mix files from unrelated releases.

Headless servers: fix the display separately

Installing libXrender.so.1 satisfies a linker dependency; it does not provide an X display. Ubuntu’s wkhtmltopdf package recommends an X server or Xvfb. If the library error is gone but the command complains about DISPLAY, cannot connect to an X server, or fails during rendering, install a virtual framebuffer and run the capture inside it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
sudo apt update
sudo apt install xvfb
xvfb-run --auto-servernum wkhtmltoimage https://example.com output.png

For a local HTML file, replace the URL with the input path:

xvfb-run --auto-servernum wkhtmltoimage page.html page.png

Use a wkhtmltopdf build whose documented runtime behavior matches your server. A static or bundled build can reduce package-management work, but it still needs architecture compatibility and may still require a display arrangement. A distribution package or vendor-supported build with explicit dependencies is generally easier to maintain across OS updates.

Why installing wkhtmltoimage may not have fixed it

The executable came from a different source

You may have installed a distribution package while command -v points to a manually extracted binary in /usr/local/bin, a container layer or an application directory. Check the path and inspect that exact file with file and ldd.

The package architecture does not match

A 32-bit executable cannot use only the host’s 64-bit library. Install libxrender1:i386 after enabling i386 multiarch, or replace the binary with a native build.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

The linker cache is stale

The package can contain the file while the cache is outdated. Run sudo ldconfig, then verify with ldconfig -p.

A container or restricted runtime hides system libraries

Run the checks inside the same container, chroot, service account and environment that launches wkhtmltoimage. A library installed on the host is not automatically visible inside a container. Include the matching runtime package in the image and rebuild it.

Troubleshooting by symptom

Symptom Likely cause Action
libXrender.so.1: cannot open shared object file Provider package is absent or wrong architecture Install the matching libxrender1 package and rerun ldd.
File appears in dpkg -L, but ldconfig -p is empty Dynamic-linker cache has not been refreshed Run sudo ldconfig; check library search paths if it remains absent.
Next error names libfontconfig or another library Multiple runtime dependencies are missing Install the distribution package that owns the named library, then rerun ldd.
Library error is gone, but no display can be opened Headless machine lacks an X server Use xvfb-run or a supported build with an appropriate display setup.
It works interactively but fails from a service Different PATH, user, container or environment Log the resolved path, run ldd as the service user and install dependencies in that runtime.
Crashes after a hand-made symlink Incompatible ABI or library version Remove the symlink and reinstall the repository package matching the binary.

Unsafe fixes to avoid

  • Do not download an arbitrary libXrender.so from a file-sharing site.
  • Do not symlink an unrelated version merely to silence the loader.
  • Do not copy a library from another distribution release or architecture.
  • Do not assume that a successful linker check means fonts, Xvfb and page resources will render correctly.

An ABI mismatch can replace a clear startup error with intermittent crashes, corrupted output or subtle rendering faults. Keep the provider package and executable within the same supported distribution and architecture.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a clean website screenshot rather than maintaining wkhtmltoimage, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners like a visitor, removes more than 60 known consent platforms plus newsletter popups and chat widgets before capture, and lets you turn those cleanup steps off. Only clean shots are billed: bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and each response reports the result with X-Page-Verdict and X-Billed headers.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

One GET request returns PNG, JPEG, WebP or PDF. The API supports full-page captures with lazy images, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper and page controls, custom CSS and JavaScript, clicks, selector or network-idle waits, request and resource blocking, headers, cookies, user agents, Authorization, timezone, geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous webhooks, bulk capture of 100 URLs per call, usage data and an OpenAPI specification. Parameter names used by other screenshot APIs also work.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

See the ScreenshotNeo documentation for the complete option list. A minimal cURL capture is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The equivalent Python request is:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
const buffer = Buffer.from(await res.arrayBuffer());
require('fs').writeFileSync('shot.webp', buffer);

The Free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing provides two months free. Sign up for the free ScreenshotNeo plan to try it without a card.

Recommended verification sequence

  1. Resolve the binary path with command -v.
  2. Confirm its architecture with file.
  3. Install the matching libxrender1 package.
  4. Confirm ownership with dpkg -L and linker visibility with ldconfig -p.
  5. Run ldd and repair every remaining not found entry.
  6. On a headless host, run the verified command under xvfb-run.
  7. Capture a small test page before putting the command into a service or batch job.

Frequently Asked Questions

Is libXrender part of wkhtmltoimage?

No. It is an external X Rendering Extension client library loaded by the Linux dynamic linker. Debian-family systems normally obtain it from the distribution’s libxrender1 package.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I fix this by setting LD_LIBRARY_PATH?

Only when you are deliberately using a supported library directory that matches the executable. It is not a substitute for installing the correct package, and it can make an incompatible ABI take precedence over the system library.

Does Xvfb replace libXrender.so.1?

No. Xvfb supplies a virtual display. The executable must still be able to load libXrender.so.1 and its other shared-library dependencies.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.