Who has never experienced an error similar to “package (whatever) had non-zero exit status” when installing it using commands? Among other reasons, this error is usually associated with a failure when finding package dependencies in R. Many times, it can become extremely desperate. It happened at least to me. You want to install a package that you need to analyze some specific data, you are motivated to do so and you suddenly read that damn error. What’s going on? Why? If you continue reading, you will see how I solved it…
On which operating did it work?
First, I must mention the operating system I used: Linux Mint 17.3 Rosa.
Therefore, this solution could be compatible with previous versions of Linux Mint, as well as Ubuntu and its derivatives.
Why had I a “non-zero exit status” error?
My fault was to believe that the error was in R. Wrong! The real failure was that several packages of Linux Mint were not installed. Actually, they were required by R to work properly. That’s why the damn had non-zero exit status error appeared.
How did I solve it?
With a simple command in the console. Install these packages that are needed to solve the problem: curl, libssl-dev, libcurl and xml2:
sudo apt-get install curl libssl-dev libcurl4-openssl-dev libxml2-dev
One final thought
This I’ve written responds to my particular experience. It is likely that this solution is not satisfactory to all readers of this post. But if I help any of you, I would be pleased.
Long live Open-Source Software!