installing R studio server on Ubuntu 22.04 LTS occour dependency problems : Package libclang-dev is not installed

I am installing the R studio server on my Ubuntu22.04 LTS, when

sudo gdebi rstudio-server-2023.09.1-494-amd64.deb

error occours

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done

RStudio Server
 RStudio is an integrated development environment (IDE) designed to support multiple languages, including both R and Python. It includes a console, syntax-highlighting editor that supports direct code execution, and a variety of robust tools for plotting, viewing history, debugging and managing your workspace.
Do you want to install the software package? [y/N]:y
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1
  c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
Selecting previously unselected package rstudio-server.
(Reading database ... 204624 files and directories currently installed.)
Preparing to unpack rstudio-server-2023.09.1-494-amd64.deb ...
Unpacking rstudio-server (2023.09.1+494) ...
dpkg: dependency problems prevent configuration of rstudio-server:
 rstudio-server depends on libclang-dev; however:
  Package libclang-dev is not installed.

dpkg: error processing package rstudio-server (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 rstudio-server

then I

sudo apt-get update
sudo apt-get install libclang-dev

it shows:

Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 https://packages.microsoft.com/repos/edge stable InRelease
Hit:3 https://ppa.launchpadcontent.net/c2d4u.team/c2d4u4.0+/ubuntu jammy InRelease
Hit:4 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libclang-dev : Depends: libclang-14-dev (>= 14~) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Then I fix the installation by

sudo apt --fix-broken install

and

sudo apt-get install libclang-14-dev

it does not work, and shows:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 lib32gcc-s1 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.3.0-1ubuntu1~22.04 is to be installed
 lib32stdc++6 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.3.0-1ubuntu1~22.04 is to be installed
 libc6-i386 : Depends: libc6 (= 2.35-0ubuntu3) but 2.35-0ubuntu3.5 is to be installed
 libobjc-11-dev : Depends: gcc-11-base (= 11.2.0-19ubuntu1) but 11.4.0-1ubuntu1~22.04 is to be installed
                  Depends: libgcc-11-dev (= 11.2.0-19ubuntu1) but 11.4.0-1ubuntu1~22.04 is to be installed
                  Depends: libobjc4 (>= 11.2.0-19ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I don't know how to fix this.

Do you have custom package repos? If yes, I would try to remove those first, and then try again to fix the current set of packages.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.