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

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

新規登録して質問してみよう
ただいま回答率
85.51%
コマンド

コマンドとは特定のタスクを行う為に、コンピュータープログラムへ提示する指示文です。多くの場合、コマンドはShellやcmdようなコマンドラインインターフェイスに対する指示文を指します。

コマンドライン

コマンドライン(別名:Command Line Interface)は、ユーザに命令の入力を促す(プロンプト)文字列の表示を行い、すべての操作をキーボードを用いて文字列を打ち込む事でプログラムを走らせるユーザインターフェースです。

apt-get

apt-getコマンドはUNIX系OSのパッケージのインストールなど、パッケージ管理を行うためのコマンドです。

Q&A

解決済

1回答

3443閲覧

コマンドラインにて、apt-getを使用できるようにしたい

AinSphere

総合スコア8

コマンド

コマンドとは特定のタスクを行う為に、コンピュータープログラムへ提示する指示文です。多くの場合、コマンドはShellやcmdようなコマンドラインインターフェイスに対する指示文を指します。

コマンドライン

コマンドライン(別名:Command Line Interface)は、ユーザに命令の入力を促す(プロンプト)文字列の表示を行い、すべての操作をキーボードを用いて文字列を打ち込む事でプログラムを走らせるユーザインターフェースです。

apt-get

apt-getコマンドはUNIX系OSのパッケージのインストールなど、パッケージ管理を行うためのコマンドです。

0グッド

0クリップ

投稿2017/08/08 11:38

編集2017/08/09 03:30

###前提・実現したいこと
コマンドラインにて、apt-getを使用できるようにしたいです。

###発生している問題・エラーメッセージ
このサイトを参考にapt-getを使用したくて、finkを入れようとしてました↓

https://podluck.wordpress.com/2012/12/31/mac-os-10-7%E3%81%A7apt-get%E3%81%97%E3%81%9F%E3%81%8F%E3%81%A6fink%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F/

そしたら、8.の

$ fink selfupdate

のところで、

$ fink selfupdate /usr/bin/rsync -az -q rsync://distfiles.master.finkmirrors.net/finkinfo//TIMESTAMP /sw/fink/TIMESTAMP.tmp I will now run the rsync command to retrieve the latest package descriptions. /usr/bin/rsync -rtz --delete-after --delete -q --include='10.9-libcxx/' --include='10.9-libcxx/stable/' --include='10.9-libcxx/stable/main/' --include='10.9-libcxx/stable/main/finkinfo/' --include='10.9-libcxx/stable/main/finkinfo/*/' --include='10.9-libcxx/stable/main/finkinfo/*' --include='10.9-libcxx/stable/main/finkinfo/**/*' --include='VERSION' --include='DISTRIBUTION' --include='README' --exclude='**' 'rsync://distfiles.master.finkmirrors.net/finkinfo' '/sw/fink/' Scanning package description files.......... Information about 10345 packages read in 0 seconds. The following 5 packages will be installed or updated: dpkg dpkg-base-files fink-mirrors install-info tar The following 6 additional packages will be installed: expat1 expat1-shlibs fink-package-precedence gettext-tools locale-textdomain-pm5182 text-unidecode-pm Default answer will be chosen in 60 seconds... Do you want to continue? [Y/n] Setting runtime build-lock... dpkg-deb -b /sw/src/fink.build/root-fink-buildlock-dpkg-1.10.21-1245 /sw/src/fink.build Can't exec "dpkg-deb": No such file or directory ### execution of dpkg-deb failed, exit code -1 Failed: can't create package fink-buildlock-dpkg-1.10.21-1245

と出ます。これは、dpkg-debがおかしいのでしょうか?

###他に試したこと
他のやり方でapt入れれないかと思い、試したところ、やはりdpkg-debで躓きます。

$ fink install apt Password: Information about 10345 packages read in 1 seconds. The following package will be installed or updated: apt The following 2 additional packages will be installed: apt-shlibs dpkg Default answer will be chosen in 60 seconds... Do you want to continue? [Y/n] Y Setting runtime build-lock... dpkg-deb -b /sw/src/fink.build/root-fink-buildlock-dpkg-1.10.21-1245 /sw/src/fink.build Can't exec "dpkg-deb": No such file or directory ### execution of dpkg-deb failed, exit code -1 Failed: can't create package fink-buildlock-dpkg-1.10.21-1245

###補足情報(言語/FW/ツール等のバージョンなど)
・macOS Sierra ver.10.12.6(16G29)
・finkは参考サイトの7.まで終わっているので、バージョンを調べたところ、

$ fink –V Fink 0.41.1

今の、環境設定です。

$ export -p declare -x Apple_PubSub_Socket_Render="/private/tmp/com.apple.launchd.pDRRAaym6R/Render" declare -x HOME="/Users/dama" declare -x INFOPATH="/sw/share/info:/sw/info:/usr/share/info" declare -x LANG="ja_JP.UTF-8" declare -x LOGNAME="dama" declare -x MANPATH="/sw/share/man:/Users/dama/anaconda/share/man:/opt/local/share/man/ja:/opt/local/share/man:/usr/local/share/man:/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man:/sw/lib/perl5/5.18.2/man" declare -x OLDPWD="/Users/dama/Downloads/codes_distribution/codes/image_processing/result_checker/build" declare -x PATH="/sw/bin:/sw/sbin:/Users/dama/anaconda/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" declare -x PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin" declare -x PWD="/" declare -x SHELL="/bin/bash" declare -x SHLVL="1" declare -x SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.lv8DoGuUyD/Listeners" declare -x TERM="xterm-256color" declare -x TERM_PROGRAM="Apple_Terminal" declare -x TERM_PROGRAM_VERSION="388.1.1" declare -x TERM_SESSION_ID="3FCFAFD9-36A5-4F5C-8956-821F39EE2B73" declare -x TMPDIR="/var/folders/9z/1bxhtshs5z53p5tltlw1gsch0000gn/T/" declare -x USER="dama" declare -x XPC_FLAGS="0x0" declare -x XPC_SERVICE_NAME="0" declare -x __CF_USER_TEXT_ENCODING="0x1F5:0x1:0xE"

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

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

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

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

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

CHERRY

2017/08/09 01:30 編集

デフォルトでインストールしたのであれば、 /sw/bootstrap/bin/dpkg-deb のファイルは存在していますか? 環境変数 PATH はどうなっているでしょうか?
AinSphere

2017/08/09 03:31

環境設定の情報を追加しました。これは、dpkg-debが入ってないということですか?
CHERRY

2017/08/09 03:38

/sw/bootstrap/bin/dpkg-deb は、存在していますか? 存在しているなら path を追加すると動くかもしれません。
AinSphere

2017/08/09 06:29 編集

/sw/bootstrap/bin/dpkg-deb があるのを確認しました。[PATH=$PATH:/sw/bootstrap/bin/dpkg-deb]と環境設定に情報を追加して見たのですが、結果は変わりませんでした。 どうしたら良いのでしょうか?
guest

回答1

0

ベストアンサー

最後のエラーメッセージが下記です。

Can't exec "dpkg-deb": No such file or directory ### execution of dpkg-deb failed, exit code -1

翻訳すると下記になります。つまり、dpkg-debがインストールされていないか、パスが通ってないため、実行できないというエラーです。

"dpkg-deb"を実行できません:そのようなファイルやディレクトリはありません ### dpkg-deb実行失敗(中止コード-1)

dpkgをインストールするには、下記のようにします。

brew install dpkg

brewを入れていない場合は、こんな感じでインストールします。
他にもJavaCommand Line Toolsなどが合わせて必要になります。

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

このサイトを見る限り、apt-getコマンドをインストールする方法は、pipでインストールする方法もあるようです。

pip install deb-pkg-tools

pipをインストールしていない場合は下記でインストールします。

curl -L 'https://bootstrap.pypa.io/get-pip.py' -o - | python curl -L 'https://bootstrap.pypa.io/ez_setup.py' -o - | python

投稿2017/08/27 05:54

Tomak

総合スコア1652

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.51%

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

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

質問する

関連した質問