Software⏱️ 3 min read📅 2026-06-15

How to Fix: Manually compiled TigerVNC throws syntax error on Raspberry Pi

TigerVNC compilation error on Raspberry Pi B+ due to 64-bit executable and lack of dynamic linking.

Quick Answer: The issue is caused by the 64-bit executable being compiled for a 32-bit ARM CPU, which is not compatible with the Raspberry Pi's architecture. To fix this, recompile TigerVNC using a cross-compiler that targets the correct architecture.

The error 'Could not start Xvnc. /usr/local/bin/Xvnc: 1: /usr/local/bin/Xvnc: Syntax error: ')' unexpected' is encountered when attempting to run TigerVNC on a Raspberry Pi B+ with XRandR support. This issue affects users who have compiled TigerVNC from source using CMake and are experiencing difficulties in starting the Xvnc server.

This error can be frustrating, especially for users who are new to compiling software from source. However, by following the steps outlined below, it is possible to resolve this issue and successfully run TigerVNC on the Raspberry Pi.

🔍 Why This Happens

  • The primary reason for this error is that the compiled Xvnc binary is a 64-bit executable, which is not compatible with the 32-bit ARM BCM2835 CPU of the Raspberry Pi. This incompatibility causes the 'not a dynamic executable' error when attempting to run the Xvnc binary.
  • Another possible reason for this error could be that the compiled Xvnc binary is missing or corrupted, causing the system to fail to find it.

✅ Best Solutions to Fix It

Using a compatibility layer

  1. Step 1: To resolve this issue, install the 'lib32-dev' package on the Raspberry Pi, which provides the necessary 32-bit libraries for running 64-bit executables.
  2. Step 2: Run the command 'sudo apt-get install lib32-dev' to install the required package.
  3. Step 3: Once installed, try running Xvnc again using the compatibility layer: '/usr/local/bin/Xvnc -A :0 -screen 0 1024x768x16'.

Recompiling with dynamic linking

  1. Step 1: To avoid this issue in the future, recompile the Xvnc binary using CMake with dynamic linking. This can be done by adding '-DCMAKE_BUILD_TYPE=Release -DLIBCST static' to the CMake command.
  2. Step 2: Run the following command to recompile the Xvnc binary: 'cmake .. && make'.

✨ Wrapping Up

By following these steps, it is possible to resolve the 'Syntax error: ')' unexpected' issue and successfully run TigerVNC on the Raspberry Pi B+. Remember to install the 'lib32-dev' package or recompile the Xvnc binary with dynamic linking to avoid this issue in the future.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions