Unable to install rstudio

I am new to R and coding, and only using it for a class but I am having trouble downloading R studio on linux. I have R installed successfully and downloaded the xenial rstudio. However, when I try installing rstudio in the ubuntu software it won't work and I do not know how to troubleshoot the problem. I would click install, put in my password, and it would just do nothing showing the install button again as if nothing happened. Anyone have any idea of what I need to do to get rstudio working?

After downloading the appropriate RStudio binary from https://www.rstudio.com/products/rstudio/download/#download, the easiest way to install RStudio is from a terminal with e.g.

cd ~/Downloads  # or wherever your browser downloads things by default
sudo apt-get install gdebi-core
sudo gdebi rstudio-xenial-1.1.463-amd64.deb
2 Likes

I was able to get up to the last code, but got an error after that which read:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libjpeg62

What operating system do you have installed? I assumed Ubuntu Xenial (16.04) but if you have a different or older Debian-based OS you might want to install the non-Xenial variant:

https://download1.rstudio.org/rstudio-1.1.463-amd64.deb

You can also try the latest preview release:

https://s3.amazonaws.com/rstudio-ide-build/desktop/trusty/amd64/rstudio-1.2.1086-amd64.deb

To find out which OS I have, I looked using the terminal and got:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

So I am assuming its Ubuntu 18.04.01 LTS? I tried using the two links you gave me and got the same error message, either

Dependency is not satisfiable: libjpeg62
or
Dependency is not satisfiable: libcpeg62

I was able to successfully install the xenial variant of RStudio on my Ubuntu 18.04 machine after running:

sudo apt install libjpeg62

Does that work on your machine? FWIW lsb_release -a reports the same thing for me:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

You can also try sudo apt --fix-broken install.

When trying to install libjpeg62, I get the error message: E: Unable to locate package libjpeg62
I also tried doing the fix broken install and got 0 upgrade, newly installed, or removed.

Is that still the case after running:

sudo apt update && sudo apt upgrade

That package should normally be provided by the regular repositories, so I'm surprised you don't see it.

After running:
sudo apt update && sudo apt upgrade

I get the following error message:

Err:4 _https://www.duinsoft.nl/pkg debs InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E18CE6625CB26B26
Reading package lists... Done
W: GPG error: _https://www.duinsoft.nl/pkg debs InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E18CE6625CB26B26
E: The repository 'http://www.duinsoft.nl/pkg debs InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

It looks like someone or something has changed your apt repository list. What if contained in the file at /etc/apt/sources.list?

For reference, I have:

#deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

deb http://cran.rstudio.com/bin/linux/ubuntu bionic/

I suspect that your system is missing the default Ubuntu apt repositories and so apt no longer knows how to install common packages.

I used gedit to open sources.list and it only contained one line.

deb http://www.duinsoft.nl/pkg debs all