質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
WSL(Windows Subsystem for Linux)

WSL (Windows Subsystem for Linux) は、Windows10のOS上でLinux向けのバイナリプログラムを実行可能にする機能です。また、WindowsOSのAPIを用いた仕組みを提供しており、Linux側からWindowsOSへのファイルアクセスもできます。

R

R言語は、「S言語」をオープンソースとして実装なおした、統計解析向けのプログラミング言語です。 計算がとても速くグラフィックも充実しているため、数値計算に向いています。 文法的には、統計解析部分はS言語を参考にしており、データ処理部分はSchemeの影響を受けています。 世界中の専門家が開発に関わり、日々新しい手法やアルゴリズムが追加されています。

openSUSE

openSUSEは、OpenSUSE プロジェクトによって開発されている、コミュニティベースのLinuxディストリビューションです。デスクトップやサーバなどで動作し、Webページ閲覧や、メールや写真の管理、オフィスソフト、映像・音楽の再生など、ソフトウェアパッケージが多いことが特徴です。

Q&A

解決済

2回答

1296閲覧

OpenSUSEにR4.0.3をインストールしたい

i113

総合スコア74

WSL(Windows Subsystem for Linux)

WSL (Windows Subsystem for Linux) は、Windows10のOS上でLinux向けのバイナリプログラムを実行可能にする機能です。また、WindowsOSのAPIを用いた仕組みを提供しており、Linux側からWindowsOSへのファイルアクセスもできます。

R

R言語は、「S言語」をオープンソースとして実装なおした、統計解析向けのプログラミング言語です。 計算がとても速くグラフィックも充実しているため、数値計算に向いています。 文法的には、統計解析部分はS言語を参考にしており、データ処理部分はSchemeの影響を受けています。 世界中の専門家が開発に関わり、日々新しい手法やアルゴリズムが追加されています。

openSUSE

openSUSEは、OpenSUSE プロジェクトによって開発されている、コミュニティベースのLinuxディストリビューションです。デスクトップやサーバなどで動作し、Webページ閲覧や、メールや写真の管理、オフィスソフト、映像・音楽の再生など、ソフトウェアパッケージが多いことが特徴です。

0グッド

0クリップ

投稿2020/12/24 08:34

WSL2で導入したOpenSUSE leap15.2に以下のサイトを参考に最新版のR4.0.2をインストールしたいのですが上手くいきません。
https://cran.r-project.org/bin/linux/suse/README.html

Terminal

1suse@windows:~> VERSION = $(grep "^ PRETTY_NAME" / etc / os-release | tr "" "_" | sed -e's / PRETTY_NAME = // '| sed -e's / "// g') 2grep: /: Is a directory 3grep: etc: No such file or directory 4grep: /: Is a directory 5grep: os-release: No such file or directory 6sed: -e expression #1, char 17: unknown option to `s' 7If 'VERSION' is not a typo you can use command-not-found to lookup the package that contains it, like this: 8 cnf VERSION 9 10suse@windows:~> sudo zypper install R-base R-base-devel 11Retrieving repository 'R-base' metadata .................................................................................................................................................................................................................................................................[error] 12Repository 'R-base' is invalid. 13[R-base|http://download.opensuse.org/repositories/devel:/languages:/R:/patched//] Valid metadata not found at specified URL 14History: 15 - [R-base|http://download.opensuse.org/repositories/devel:/languages:/R:/patched//] Repository type can't be determined. 16 17Please check if the URIs defined for this repository are pointing to a valid repository. 18Warning: Skipping repository 'R-base' because of the above error. 19Some of the repositories have not been refreshed because of an error. 20Loading repository data... 21Reading installed packages... 22Resolving package dependencies... 23 24The following 94 NEW packages are going to be installed: 25 expat fontconfig fonts-config libcairo2 libdatrie1 libfreetype6 libfribidi0 libgfortran4 libglvnd libgobject-2_0-0 libgomp1 libgraphite2-3 libharfbuzz0 libICE6 libicu65_1-ledata libicu-suse65_1 libjbig2 libjpeg8 libpango-1_0-0 libpixman-1-0 libpng16-16 libquadmath0 libSM6 libthai0 libthai-data 26 libtiff5 libX11-6 libX11-data libXau6 libxcb1 libxcb-render0 libxcb-shm0 libXext6 libXft2 libXmu6 libXmuu1 libXrender1 libXss1 libXt6 make perl-CPAN-Changes perl-Devel-Symdump perl-Net-DBus perl-Pod-Coverage perl-Test-Pod perl-Test-Pod-Coverage perl-X11-Protocol perl-XML-Twig R-base R-base-devel 27 R-boot R-class R-cluster R-codetools R-compiler R-core R-core-devel R-core-doc R-core-libs R-core-packages R-datasets R-foreign R-graphics R-grDevices R-grid R-KernSmooth R-lattice R-MASS R-Matrix R-Matrix-devel R-methods R-mgcv R-nlme R-nnet R-parallel R-recommended-packages R-rpart R-spatial 28 R-splines R-stats R-stats4 R-survival R-tcltk R-tools R-utils tcl tk which xbitmaps xdg-utils xhost xorg-x11-fonts xorg-x11-fonts-core xorg-x11-fonts-legacy 29 3094 new packages to install. 31Overall download size: 108.3 MiB. Already cached: 0 B. After the operation, additional 178.4 MiB will be used.

何か警告は出ていますが、Errorはないので先に進みました。

Terminal

1Continue? [y/n/v/...? shows all options] (y): y 2Retrieving package R-core-doc-3.5.0-lp152.7.67.x86_64 (1/94), 15.0 MiB ( 19.5 MiB unpacked) 34・(略) 56(93/94) Installing: R-KernSmooth-2.23.15-lp152.7.67.x86_64 ...............................................................................................................................................................................................................................................[done] 7(94/94) Installing: R-recommended-packages-3.5.0-lp152.7.67.x86_64 .......................................................................................................................................................................................................................................[done] 8Executing %posttrans scripts .............................................................................................................................................................................................................................................................................[done]

特にErrorもなくインストールが終わったのでRを起動するとバージョンが4.0.3でなく3.5.0になっていました。

Terminal

1suse@windows:~> R 2 3R version 3.5.0 (2018-04-23) -- "Joy in Playing" 4Copyright (C) 2018 The R Foundation for Statistical Computing 5Platform: x86_64-suse-linux-gnu (64-bit) 67・(略) 8

アップデートを試しましたが失敗しました。

Terminal

1suse@windows:~> sudo zypper update R-base 2[sudo] password for root: 3Retrieving repository 'R-base' metadata .................................................................................................................................................................................................................................................................[error] 4Repository 'R-base' is invalid. 5[R-base|http://download.opensuse.org/repositories/devel:/languages:/R:/patched//] Valid metadata not found at specified URL 6History: 7 - [R-base|http://download.opensuse.org/repositories/devel:/languages:/R:/patched//] Repository type can't be determined. 8 9Please check if the URIs defined for this repository are pointing to a valid repository. 10Warning: Skipping repository 'R-base' because of the above error. 11Some of the repositories have not been refreshed because of an error. 12Loading repository data... 13Reading installed packages... 14No update candidate for 'R-base-3.5.0-lp152.7.67.x86_64'. The highest available version is already installed. 15Resolving package dependencies... 16 17Nothing to do.

メッセージを見る限りSUSE leap15.2で扱えるRの最高バージョンは3.5.0のようですが、上記サイトを見る限りleap15.2用のR4.0.3パッケージがあるようです。そこで上記サイトからympをダウンロードし実行しましたが失敗しました。

Terminal

1suse@windows:~> sudo yast -i R-base-devel.ymp 2[sudo] password for root: 3DEPRECATED. Use zypper directly: zypper --non-interactive install `cat "R-base-devel.ymp"` 4Retrieving repository 'R-base' metadata .................................................................................................................................................................................................................................................................[error] 5Repository 'R-base' is invalid. 6[R-base|http://download.opensuse.org/repositories/devel:/languages:/R:/patched//] Valid metadata not found at specified URL 7History: 8 - [R-base|http://download.opensuse.org/repositories/devel:/languages:/R:/patched//] Repository type can't be determined. 9 10Please check if the URIs defined for this repository are pointing to a valid repository. 11Warning: Skipping repository 'R-base' because of the above error. 12Some of the repositories have not been refreshed because of an error. 13Loading repository data... 14Reading installed packages... 15'15.2</summary><description>openSUSE' not found in package names. Trying capabilities. 16No provider of '15.2</summary><description>openSUSE' found. 1718・(略) 1920No provider of 'package</description></item>' found. 21'recommended="false"><name>openSUSE:Leap:15.2</name>' not found in package names. Trying capabilities. 22No provider of 'recommended="false"><name>openSUSE:Leap:15.2</name>' found. 23'recommended="true"><name>devel:languages:R:patched</name>' not found in package names. Trying capabilities. 24No provider of 'recommended="true"><name>devel:languages:R:patched</name>' found. 25'refer' not found in package names. Trying capabilities. 26No provider of 'refer' found. 27'system.' not found in package names. Trying capabilities. 28No provider of 'system.' found. 29'the' not found in package names. Trying capabilities. 30No provider of 'the' found. 31- Did you mean THE? 32'to' not found in package names. Trying capabilities. 33No provider of 'to' found.

八方塞で困っております。ご教授ください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

R (openSUSE)
をChromeで日本語に翻訳すると、あちこちにスペースが追加されますね
technocoreさんに指摘されたところ以外にもスペースが追加されるので、翻訳しない状態でコピペすることをお勧めします

The highest available version is already installed.

VERSION=... の行の次の
zypper addrepo... の行でリポジトリを追加してますけど、それをやり忘れてませんでしょうか?

投稿2020/12/25 07:40

jbpb0

総合スコア7651

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

i113

2020/12/25 07:50

どうも有り難うございます。 翻訳せずに全て実行しても、インストールされるのは3.5.0です。
i113

2020/12/25 08:31

どうも有り難うございます。 どうやら、諦めるしかないようですね。
jbpb0

2020/12/25 08:41

ただし、「:」は「\:」か「¥:」にしないとダメだと思います
jbpb0

2020/12/25 08:56 編集

それは、リポジトリを追加するときにニックネームみたいなのを付けるのを、すでに R-base は patched を追加するときに使ってるから、その名前はダメだよ、って言ってるんです 「Please use another alias.」なので 別の名前を付けるか、前に追加したのを削除するか、どちらかやらないといけないと思います
jbpb0

2020/12/25 09:01

zypper addrepo... の最後の文字列は、分かりやすくするために短い別の名前を付けるという意味で、インストールしたいパッケージ名(今回は R-base)に合わせないといけないわけではないので、別になんでもいいのです 以下の「語彙」の「alias(別名、エイリアス)」をご覧ください https://ja.opensuse.org/Zypper/Usage/11.0#.E8.AA.9E.E5.BD.99
i113

2020/12/25 09:12

どうも有り難うございます。せっかく教えて頂いたのですが既にSUSEをリセットした後だったのでそのまま実行しました。 suse@windows:~> sudo zypper addrepo -f https://download.opensuse.org/repositories/devel\:/languages\:/R\:/released/openSUSE_Leap_15.2/devel\:languages\:R\:released.repo R-base We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for root: Adding repository 'R-base' ..............................................................[done] Repository 'R-base' successfully added URI : https://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_Leap_15.2/devel:languages:R:released.repo Enabled : Yes GPG Check : Yes Autorefresh : Yes Priority : 99 (default priority) Repository priorities are without effect. All enabled repositories share the same priority. suse@windows:~> sudo zypper install R-base R-base-devel Retrieving repository 'R-base' metadata ................................................[error] Repository 'R-base' is invalid. [R-base|https://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_Leap_15.2/devel:languages:R:released.repo] Valid metadata not found at specified URL History: - [R-base|https://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_Leap_15.2/devel:languages:R:released.repo] Repository type can't be determined. Please check if the URIs defined for this repository are pointing to a valid repository. Warning: Skipping repository 'R-base' because of the above error. 結局インストールされたのは3.5.0でした。
jbpb0

2020/12/25 09:24

-f の後の ...repo までって、全部要るのですか? 元々の VERSION=... の行を実行したら、VERSION にはそこまで入ってるのですか?
jbpb0

2020/12/25 09:30

VERSION=... の行を実行して、 zypper addrepo... の行の patched を released に変えて、 zypper... の最後の別名を既存のと被らないように指定したら、いけるんじゃないかと思うのですが、ダメですかね??
i113

2020/12/25 09:41

やはり上手くいきません。 ここまでお付き合いいただいて本当に申し訳ないのですが、諦めることにしようと思います。 どうも有り難うございました。
guest

0

/ etc / os-release

ファイル名は、スペースなど入れずに正しく書いてください。
/etc/os-release

以下のエラーメッセージを読めばすぐに原因がわかるはずです。

grep: /: Is a directory
grep: etc: No such file or directory
grep: /: Is a directory
grep: os-release: No such file or directory

投稿2020/12/24 08:41

technocore

総合スコア7225

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

i113

2020/12/24 09:07

どうも有り難うございます。 ご指摘の通りにすることでWarning等はなくなりました。 しかしRのバージョンは依然として3.5.0のままで、"zypper update R-base"を打っても、 No update candidate for 'R-base-3.5.0-lp152.7.67.x86_64'. The highest available version is already installed. Resolving package dependencies... Nothing to do. となります。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問