3

Linux ラップトップに Android Studio をインストールしようとすると、「mksdcard ツールを実行できません」というメッセージが表示されますcrouton プロジェクトを使用して Chromebook で Linux を使用する ARMv7 プロセッサ。i386 で終わる推奨パッケージをインストールしようとしましたが、コマンド ラインで次のように返されました。

パッケージ リストの読み取り中... 完了
依存関係ツリーの構築中
状態情報の読み取り中... 完了
E: パッケージが見つかりません [ここにパッケージ名]
E: 正規表現 '[パッケージ名]' でパッケージが見つかりませんでした

誰がこれを引き起こしているのか、どうすれば修正できるのか知っていますか?

4

2 に答える 2

3

I've discovered a workaround.

After a little searching, I've found that we can create executable binary of the tool for the ARMv7 platform ourselves! Whupee!

  1. Head over to GitHub and pick up the source code, mksdcard.c. Download this to wherever you'd like, but make sure you download it as mksdcard.c and not as mksdcard.c.txt, which your browser might try to do. You can always rename the file later in case you accidentally save the filename incorrectly.
  2. Over in your chroot environment, head to the directory where you downloaded the file.
  3. Make sure you have the gcc compilation tools installed. Try running gcc -v in an attempt to see what version of GCC you have installed. If this doesn't work, you'll need to install GCC via sudo apt-get install gcc.
  4. Run gcc -o mkdscard mksdcard.c. This uses GCC to compile the source code into something that can be executed. After compilation has completed, you can use ./mkscard to have Linux execute the binary file, which verifies that it works.
  5. Navigate to your Android SDK Tools directory. This is usually ~/Downloads/Android/Sdk/tools. By running ls, you'll list the files and find the version of mksdcard that your Linux distribution doesn't understand how to run. (Running ./mksdcard on this file will confirm this.)
  6. Backup the broken binary somewhere, then delete the copy in the tools folder. (I created a backups/ directory within the Android SDK Tools folder to move it to.)
  7. Within the directory, use rm -r mksdcard to delete the old mksdard binary.
  8. Finally, copy your compatible binary over to take it's place, e.g. cp ~/Downloads/mksdcard . (Copies the mksdcard binary we've created to the current directory ., the Android SDK Tools folder.)
  9. Head back over to your Android Studio installer. In the dialogue complaining about mksdcard failing, hit Retry and the installation should continue. After it's finished, be sure to apply any updates that are recommended by the environment. Enjoy!
于 2016-10-29T14:20:56.840 に答える