Skip to content

Fix: Error: Function rcpp_precious_remove not provided by package rcpp

  • by
  • 2 min read

As easy as programming has become these days, new developers, or even seasoned ones, have to jump through a lot of hoops to get their programs to work flawlessly. One of those hoops is diagnosing random dependency errors out of the blue. 

In this article, we’re looking at the “Error: Function rcpp_precious_remove not provided by package rcpp” issue and giving you three fixes to solve the problem. 

Also read: Xtools XToolkit installation error: 4 Fixes


Update Rcpp

One of the most straightforward fixes to the Rcpp package not working as expected is updating the entire package to the latest stable build. This has been known to resolve any errors regarding missing services that you might encounter. All you have to do is use the following command.

install.packages('Rcpp')

Alternatively, you can use this command if the command mentioned above doesn’t work. 

update.packages()

Instead of sticking to a GUI-based approach, you can use the Packages panel in RStudio to update the Rcpp package. 


Reinstall Rcpp

If updating didn’t do the trick, reinstalling the package will remove all associated files and add them back to freshen up your installation and iron out any problems that you might be experiencing. Just enter the following commands one at a time.

install.packages('Rcpp')
library(Rcpp)

Make sure to restart RStudio for this to take effect. Additionally, if you’re facing this problem with any packages, load them using the library(package name) command once you’re done reinstalling Rcpp. 


Update R

If updating the packages themselves didn’t solve the problem for you, you can update the language itself to see if that’s the cause of the problem. Users have reported that after updating the packages failed, updating R did resolve the problem for them.

Fix: error: function rcpp_precious_remove not provided by package rcpp
The latest R version at the time of writing is 4.20.0

You can get the latest R version from either the R official website or use the Check for Updates option in RStudio to do the same. 

Also read: Error loading preloads: Could not find renderer: 4 Fixes

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: yadullahabidi@pm.me.

>