Troubles with "make" command to install R-3.2.1 - r

I tried to install the R-3.2.1 in my Ubuntu 14.04.2 LTS, but I had troubles with "make" command. How can I install in a better way?
Thanks

The easiest way is via launchpad:
sudo add-apt-repository -y ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install -y r-base

Avoid this dependency resolving issues...simple way to install R in Ubuntu is as below:
load the text file /etc/apt/sources.list in your editor. You must have root privileges, though because it is a system file.
First open a terminal (Applications - Accessories - terminal).
Then open /etc/apt/sources.list with root privileges: type in the terminal
gksudo gedit /etc/apt/sources.list
You will need to give your user password (this assumes you are a user with root privileges) and then the file will load in the editor "gedit".
At the end of the file, add below line :
deb http:///bin/linux/ubuntu trusty/
run below commands interminal
sudo apt-get update
sudo apt-get install r-base
• Now to start an R prompt in your terminal prompt type "R" and hit "enter" key

Related

Permision denied for dotnet

I recently installed dotnet 5.0 on Pop OS but whenever I try to use it it says that I don't have permission.
For example, if I just try to run the command dotnet it gives the the message
cannot snap-exec: cannot exec "/snap/dotnet-sdk/144/snap/command-chain/snapcraft-runner": permission denied
When I run the command as the root user it works perfectly fine.
I don't know if this is because I installed dotnet as a snap package
I had the same issue and unfortunately the dotnet issue page was not working.
To fix this issue I had to install the package with apt instead of snap.
sudo snap remove dotnet-sdk // if needed
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install apt-transport-https
sudo apt-get install -y dotnet-sdk-5.0
Remove snap first
sudo snap remove dotnet-sdk
Manually download Dotnet SDK https://dotnet.microsoft.com/en-us/download/dotnet/6.0
When your download completes, open the terminal and run the following commands to extract the SDK to make the commands available at the terminal.
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-6.0.101-linux-x64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
one last thing
Edit shell profile to permanently

Installing R devtools package on WSL

The problem:
I'm trying to install the devtools package for R. I'm using Ubuntu 18.04 LTS on WSL, the Windows Subsystem for Linux.
I'm able to install some packages just fine with a simple call to install.packages() from within R on WSL. However, other packages seem to give me trouble.
None of the following methods I've tried seem to work:
* I've tried installing the package with install.packages().
* I've tried installing from source into /usr/local/lib/R/site-library.
* I've tried installing from source into a personal library.
Error message:
I was recieving an error message like that discussed here, but I was unable to fix the problem by editing unpackPkgZip because it didn't exist.
The Question:
How can I install devtools on WSL?
Solution:
I was able to fix the problem by starting over. I uninstalled Ubuntu and then reinstalled it. With a fresh install of Ubuntu 18.04 I followed these instructions. There are other online tutorials which probably work just fine, but I followed this one. You can ignore the bit about installing an rstudio server and the fsl package if you wish.
# Install R on WSL
sudo apt-get update -qq -y
sudo apt-get install -y wget git
OS_DISTRIBUTION=$(lsb_release -cs)
wget -O- http://neuro.debian.net/lists/${OS_DISTRIBUTION}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
sudo apt-get update
sudo apt-get install libopenblas-base r-base
sudo apt-get update -qq -y
sudo apt-get install -y libgit2-dev
sudo apt-get install -y libcurl4-openssl-dev libssl-dev
sudo apt-get install -y zlib1g-dev libssh2-1-dev libpq-dev libxml2-dev
#sudo apt-get install -y libhdf5 # This didn't work.
Now try installing devtools in R.
# Install devtools
install.packages("devtools", repos = "https://cran.rstudio.com/")
Permission error:
If you encounter a permission error like the following...
Warning in install.packages("edgeR") :'lib = "/usr/local/lib/R/site-library"' is not writable Would you like to use a personal library instead? (y/n)
...you need to provide the user with write access to the directory where R packages are installed (see here). Try changing the group ownership of this directory:
# Who has ownership of /usr/local/lib/R/site-library/?
ls -l /usr/local/lib/R/
# drwxrwsr-x 1 root staff 512 Jul 18 21:38 site-library
# Change ownership.
sudo chgrp twesleyb /usr/local/lib/R/site-library/
ls -l /usr/local/lib/R/
#drwxrwxr-x 1 root twesleyb 512 Jul 18 21:38 site-library
# In this case I have write access, but in case you need to add it, try:
# $ sudo chmod g+w /usr/local/lib/R/site-library
You should now be able to install.packages("package").
I'm a linux novice, but I think this is an okay thing to do.
Update:
You can also try following duckmayr's instructions.

How to install Swoole in ubuntu

Simply my Question is How to Install Swoole in Ubuntu 14.04 LTS
I have tried
sudo pecl install swoole
am getting handfull of errors, already posted here
Is there any alternate way to install the same...
Swoole Installation alternate ways
1.Install from source
sudo apt-get install php7-dev
git clone https://github.com/swoole/swoole-src.git
cd swoole-src
phpize
./configure
make && make install
2.Example for static compile
git clone -b PHP-7.2 --depth 1 https://github.com/php/php-src.git
cd php-src/
git clone -b master --depth 1 https://github.com/swoole/swoole-src.git ext/swoole
./buildconf --force
./configure --prefix=/usr/local/php7 --disable-all --enable-cli --disable-cgi --disable-fpm --disable-phpdbg --enable-bcmath --enable-hash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --enable-sockets --enable-pdo --with-sodium --with-password-argon2 --with-sqlite3 --with-pdo-sqlite --with-pcre-regex --with-zlib --with-openssl-dir --enable-swoole-static --enable-openssl --with-swoole
time make -j `cat /proc/cpuinfo | grep processor | wc -l`
sudo make install
Some Linux distributions do not include the PHP-XML extension in their PHP package and will need to be enabled before using PECL. You can install using apt-get install php-xml and you may need to install PHPize to compile Swoole, you can install it using apt-get install php7.*-dev or whatever PHP version you are using.
Then try again with sudo pecl install swoole
For those who installed PHP from ondrej/php PPA (quite common way to install PHP in Ubuntu) it's quite easy now:
sudo apt install php-swoole
Or for specific version:
sudo apt install php7.4-swoole
Tip. This is how you usually install ondrej/php PPA:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Install swoole for version specific should work for example if you have php 7.3 use
sudo apt install php7.3-swoole
replace the version to your local php env

Log in RStudio with AWS EC2 instance

I managed to follow all the steps to create EC2 instance and install R Server on it.
But now when I go to RStudio to connect (which looks something like "ec2-[Public IP]-.eu-west-3.compute.amazonaws.com:8787")
I am asked a username and a password but I did not configure any:
I tried rstudio (username) and rstudio (password) but it does not work.
Anyone knows how I can find the username and the password to connect?
Thanks.
M
If this is using the AMI from http://www.louisaslett.com/RStudio_AMI/, the default password recently changed to the instance ID of the EC2. A code starting with i- and 17 alphanumeric characters, for example.
Username is still rstudio.
You can create a user/password in Linux and use it to log in
#add user(s)
useradd username
echo username:password | chpasswd
here is a detailed blog from on running R on AWS
I was having the same issue (I believe there is no ubuntu password for an AWS EC2 Instance and R studio requires one).
You can add a new user by typing the following: sudo adduser YOURUSERNAME and follow the terminal instructions (press enter to skip the info you do not want to give). Head over to the IP xxx.xxx.xxx.xxx:8787 and you should be able to log in now.
How to install R studio 3.4.4, upgrade to 3.6.0 and add a username (Ubuntu 18):
sudo apt update
sudo apt-get install -y r-base r-base-dev
sudo apt install gdebi-core
wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1335-amd64.deb
sudo gdebi rstudio-server-1.2.1335-amd64.deb
sudo chmod 777 -R /usr/local/lib/R/site-library
sudo adduser YOURUSERNAME
#########
# Upgrade R
echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y r-base r-recommended r-base-dev
# Rstudio dependency issues (when installing devtools) - I installed from an AWS EC2 account so I need to change my root password.
sudo passwd root
su root
apt-get -y build-dep libcurl4-gnutls-dev

R studio not working on ubuntu 16.04

I converted to Ubuntu today, but have a problems launching R studio. I installed R through the command prompt like this:
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/">> /etc/apt/sources.list'
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install r-base
I cheked if R was installed proper by typing R and then exiting by q(save="no").
I installed R studio through the command prompt by
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-0.99.902-amd64.deb
sudo gdebi rstudio-server-0.99.902-amd64.deb
But this doesn't work and i can't find the launch button or open R studio.
Afterwards i tried to remove it and install it through the website but doesn't work either. What should i do?
There is no lauch button -- you connect to port 8787 on the machine running RStudio Server.
In other words, type http://localhost:8787 in the address bar of your browser. You should see a login screen with the RStudio logo. This connects you to your RStudio Server.
If you want to run the Desktop version you need to install the other available .deb package.
For those on Ubuntu 16.10, or who prefer to use the desktop version of RStudio, you may wish to follow the solution posted by Mike Williamson reproduced below:
1) Get the latest R Studio Daily Build here, though note that it's not necessarily stable.
2) Install, chaning the name of the package to the one you downloaded - perhaps easiest if you go to your Downloads directory - and you'll probably find that there are missing packages:
$ sudo dpkg -i rstudio-1.0.124-amd64.deb
3) Download the missing packages (the lack of which causes the installation to fail):
$ wget http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.deb
$ wget http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
4) Install them:
$ sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb
$ sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
5) Make sure they don't get over-written at the next software update:
$ sudo apt-mark hold libgstreamer-plugins-base0.10-0
$ sudo apt-mark hold libgstreamer0.10
6) Install RStudio (changing name to the version you downloaded):
sudo gdebi rstudio-1.1.5-amd64.deb
7) Launch RStudio:
rstudio

Resources