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

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

新規登録して質問してみよう
ただいま回答率
85.48%
Perl

Perlは多目的に使用される実用性が高い動的プログラミング言語のひとつです。

Q&A

解決済

1回答

1061閲覧

/usr/local/bin/perl にCGI をインストールしたい

omooooon

総合スコア1

Perl

Perlは多目的に使用される実用性が高い動的プログラミング言語のひとつです。

0グッド

0クリップ

投稿2022/10/29 05:02

/usr/local/bin/perl に CPAN を使って CGI のモジュールをインストールしようとしたところ以下のようになり正常にインストールされず困っています。perl 他のモジュールである Shell は同じ操作でインストールすることができました。

パソコンについての知識が皆無で何がどうなっているのか分からない状態です。どなたかアドバイスいただければ幸いです。よろしくお願いします。

発生している問題・エラーメッセージ

cpan[2]> install CGI Running install for module 'CGI' Checksum for /Users/omo/.cpan/sources/authors/id/L/LE/LEEJO/CGI-4.54.tar.gz ok Scanning cache /Users/omo/.cpan/build for sizes ............................................................................DONE 'YAML' not installed, will not store persistent state Configuring L/LE/LEEJO/CGI-4.54.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite HTML::Entities 3.69 not found. Warning: prerequisite Test::Warn 0.3 not found. Warning: LINKTYPE set to '', no longer necessary Generating a Unix-style Makefile Writing Makefile for CGI Writing MYMETA.yml and MYMETA.json LEEJO/CGI-4.54.tar.gz /usr/local/Cellar/perl/5.36.0/bin/perl Makefile.PL -- OK Running make for L/LE/LEEJO/CGI-4.54.tar.gz ---- Unsatisfied dependencies detected during ---- ---- LEEJO/CGI-4.54.tar.gz ---- HTML::Entities [requires] Test::Warn [build_requires] Running install for module 'HTML::Entities' Checksum for /Users/omo/.cpan/sources/authors/id/O/OA/OALDERS/HTML-Parser-3.79.tar.gz ok Configuring O/OA/OALDERS/HTML-Parser-3.79.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite HTTP::Headers 0 not found. Generating a Unix-style Makefile Writing Makefile for HTML::Parser Writing MYMETA.yml and MYMETA.json OALDERS/HTML-Parser-3.79.tar.gz /usr/local/Cellar/perl/5.36.0/bin/perl Makefile.PL -- OK Running make for O/OA/OALDERS/HTML-Parser-3.79.tar.gz ---- Unsatisfied dependencies detected during ---- ---- OALDERS/HTML-Parser-3.79.tar.gz ---- HTTP::Headers [requires] Running install for module 'HTTP::Headers' Checksum for /Users/omo/.cpan/sources/authors/id/O/OA/OALDERS/HTTP-Message-6.44.tar.gz ok Configuring O/OA/OALDERS/HTTP-Message-6.44.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite Clone 0.46 not found. Warning: prerequisite HTTP::Date 6 not found. Warning: prerequisite IO::HTML 0 not found. Warning: prerequisite LWP::MediaTypes 6 not found. Generating a Unix-style Makefile Writing Makefile for HTTP::Message Writing MYMETA.yml and MYMETA.json OALDERS/HTTP-Message-6.44.tar.gz /usr/local/Cellar/perl/5.36.0/bin/perl Makefile.PL -- OK Running make for O/OA/OALDERS/HTTP-Message-6.44.tar.gz ---- Unsatisfied dependencies detected during ---- ---- OALDERS/HTTP-Message-6.44.tar.gz ---- Clone [requires] HTTP::Date [requires] IO::Compress::Brotli [requires,optional] IO::HTML [requires] IO::Uncompress::Brotli [requires,optional] LWP::MediaTypes [requires] Running install for module 'Clone' Warning: You are not allowed to write into directory "/Users/omo/.cpan/sources/authors/id/G/GA/GARU". I'll continue, but if you encounter problems, they may be due to insufficient permissions. Trying with /usr/bin/curl -L -f -s -S --netrc-optional to get https://cpan.org/authors/id/G/GA/GARU/Clone-0.46.tar.gz sh: /Users/omo/.cpan/sources/authors/id/G/GA/GARU/Clone-0.46.tar.gz.tmp35881: Permission denied Function system("/usr/bin/curl -L -f -s -S --netrc-optional "https://cpan.org/authors/id/G/GA/GARU/Clone-0.46.tar.gz" > "/Users/omo/.cpan/sources/authors/id/G/GA/GARU/Clone-0.46.tar.gz.tmp35881"") returned status 1 (wstat 256) Warning: expected file [/Users/omo/.cpan/sources/authors/id/G/GA/GARU/Clone-0.46.tar.gz.tmp35881] doesn't exist Giving up on '/Users/omo/.cpan/sources/authors/id/G/GA/GARU/Clone-0.46.tar.gz' Note: Current database in memory was generated on Sat, 29 Oct 2022 03:29:01 GMT

該当のソースコード

perl

1/usr/local/bin/perl -MCPAN -e shell

補足情報(FW/ツールのバージョンなど)

使っているのは、macOS Montereyバージョン12.6 MacBook Air (M1, 2020) です。

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

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

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

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

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

guest

回答1

0

ベストアンサー

このメッセージが示唆している通りではないでしょうか。

Warning: You are not allowed to write into directory "/Users/omo/.cpan/sources/authors/id/G/GA/GARU".
I'll continue, but if you encounter problems, they may be due
to insufficient permissions.

自分のホームディレクトリ下などの適切に書き込み権限がある場所にインストール先を指定するか、管理者になって作業するか、どちらかを選択しましょう。

投稿2022/10/29 07:03

KojiDoi

総合スコア13671

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

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

omooooon

2022/10/29 08:08

設定のユーザとグループのところを見ると今のアカウントが管理者になっていました。書き込み権限がある場所にインストール先を指定するというのはPATHを通すということとはまた違うんでしょうか。
KojiDoi

2022/10/30 05:15

> インストール先を指定するというのはPATHを通すということとはまた違うんでしょうか。 この辺がしっかり理解できないままにCGIを運用するなど無理なんですが、PATHとは何かから説明するとなるととんでもなく長くなるので、教科書を探して読んでみてください。 端的に言えば「全然別の話」です。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問