在 Arch 上安装 Rstudio 时出错

在 Arch 上安装 Rstudio 时出错

yay -Syyu rstudio-desktop当我尝试安装 Rstudio Desktop 时,在终端中运行时出现此错误。

In file included from /home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/ExponentialBackoff.hpp:24,
from /home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/ExponentialBackoff.cpp:18:
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp:362:9: error: ‘set’ in namespace ‘std’ does not name a template type
362 |    std::set<T, std::less<T>, std::allocator<T> > set_;
|         ^~~
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp:28:1: note: ‘std::set’ is defined in header ‘<set>’; did you forget to ‘#include <set>’?
27 | #include <core/Log.hpp>
+++ |+#include <set>
28 |
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp: In member function ‘bool rstudio::core::thread::ThreadsafeSet<T>::contains(const T&) const’:
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp:322:17: error: ‘set_’ was not declared in this scope
322 |          return set_.find(value) != set_.end();
|                 ^~~~
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp: In member function ‘void rstudio::core::thread::ThreadsafeSet<T>::insert(const T&)’:
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp:334:10: error: ‘set_’ was not declared in this scope
334 |          set_.insert(value);
|          ^~~~
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp: In member function ‘void rstudio::core::thread::ThreadsafeSet<T>::insert(T&&)’:
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp:343:10: error: ‘set_’ was not declared in this scope
343 |          set_.insert(value);
|          ^~~~
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp: In member function ‘void rstudio::core::thread::ThreadsafeSet<T>::remove(const T&)’:
/home/myusername/.cache/yay/rstudio-desktop/src/rstudio-2022.12.0-353/src/cpp/core/include/core/Thread.hpp:352:21: error: ‘set_’ was not declared in this scope
352 |          auto itr = set_.find(value);
|                     ^~~~
make[2]: *** [src/cpp/core/CMakeFiles/rstudio-core.dir/build.make:202: src/cpp/core/CMakeFiles/rstudio-core.dir/ExponentialBackoff.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:521: src/cpp/core/CMakeFiles/rstudio-core.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
make: Leaving directory '/home/myusername/.cache/yay/rstudio-desktop/src/build'
==> ERROR: A failure occurred in package().
Aborting...
-> error making: rstudio-desktop

答案1

这不是 yay 的错误,但 RStudio 构建似乎对于某些编译器(由 make 调用,由 pkgbuild 调用,由 yay 调用)有问题。

安装二进制版本或者等待 rstudio AUR 更新至修补版本

相关内容