Closed sreedta8 closed 2 years ago
Thank you @sreedta8 for letting me know! Indeed, it looks like during compilation you ran out of memory. Modern Linux distros will vary with how large the swap is but I think most will be at least 4GB (as in your description). Also, some will use swap files and others swap partitions: Ubuntu will use a swap file.
A workaround might be to use the c2d4u
repository that gives you access to all CRAN packages via sudo apt install r-cran-bmgarch
. I don't know if this works for Lubuntu - but you could give it a try (see https://cran.r-project.org/bin/linux/ubuntu/#get-5000-cran-packages).
Thanks for getting back @ph-rast and thanks again for your package. I was using your package the past couple of days and I absolutely love it. I will definitely test the c2d4u
repository and let you know how it goes.
My intuition is that if you go with c2d4u
you want to avoid installing packages from within R -- mixing package management systems in Linux never bodes well...
Hello @ph-rast
Wanted to share the issues I ran into when trying to install
bmgarch
on a Lubuntu (21.10) Linux laptop. I did not have these problems when installing on a Windows 10 laptop. I'm a beginner/intermediate user with Linux. Thank you for your lovely package! I'm hoping my notes below will help another introductory level user such as myself.I went through a few iterations and these are the steps I found worked for me to initiate/prepare for the installation
Steps 1 & 2 are done at the
bash
prompt; Step 3 and 4 involves launching R and installing packages within the R spacelibv8-dev
usingsudo apt install libv8-dev
libnode-dev
usingsudo apt install libnode-dev
Not all users may run into the fatal error I run into after the compilation goes on for some time. The error is described below:
C++: fatal error: Killed signal terminated program cc1plus
If you encounter this error it means that the current swap file setup on your Linux machine is not large enough and hence running out of swap memory. Please follow the steps below in the exact sequence (You need admin/root level rights/access for all commands). I found the precise solution from here. All the steps shown below I ran from the main
bash
prompt in the terminal.Create the partition path
sudo mkdir -p /var/cache/swap/
Set the size of the partition bs=64M is the block size, count=64 is the number of blocks, so the swap space size is bs x count=4096MB=4GB
sudo dd if=/dev/zero of=/var/cache/swap/swap0 bs=64M count=64
Set permissions for this directory
sudo chmod 0600 /var/cache/swap/swap0
Create the SWAP file
sudo mkswap /var/cache/swap/swap0
Activate the SWAP file
sudo swapon /var/cache/swap/swap0
Check if SWAP information is correct
sudo swapon -s
Once the swap file partition is complete, then go to the R terminal/prompt and rerun the
install.packages("bmgarch")
. This process will take some time. However, for me this came out well and my fata error went away and the library was installed.Note - You may see other errors, different from mine since we are working with open-source tools and there are many rough edges.