満たされていないインストール依存関係の問題を解決します。

満たされていないインストール依存関係の問題を解決します。

どういうわけか私のext3ファイルシステムの一部が破損し、ほとんどのPythonインストールがめちゃくちゃになりました。私がすぐに気付いた唯一のことは、Pythonで欠落しているモジュールエラーが発生したことです。関連ディレクトリにCDを移動しようとすると、次の結果が表示されます。

EXT3-fs error (device mmcblk0p2): htree_dirblock_to_tree: bad entry in directory #444159: directory entry across blocks - offset=0, inode=166100, rec_len=59284, name_len=255
EXT3-fs error (device mmcblk0p2): htree_dirblock_to_tree: bad entry in directory #444137: rec_len % 4 != 0 - offset=0, inode=290535, rec_len=39605, name_len=253

だから私はこのディレクトリをrm -rfに設定し、NumPyを再インストールすることにしました。それほど速くはありません:

root@napajohn:/usr/lib/pyshared/python2.6/numpy-1.6.0# python setup.py
Running from numpy source directory.Traceback (most recent call last):
  File "setup.py", line 196, in <module>
    setup_package()
  File "setup.py", line 173, in setup_package
    from numpy.distutils.core import setup
  File "/usr/lib/pyshared/python2.6/numpy-1.6.0/numpy/distutils/__init__.py", line 7, in <module>
    import ccompiler
  File "/usr/lib/pyshared/python2.6/numpy-1.6.0/numpy/distutils/ccompiler.py", line 7, in <module>
    from distutils.ccompiler import *
  File "/usr/lib/python2.6/distutils/__init__.py", line 1
    d__2);
        ^
SyntaxError: invalid syntax

そのエラーは本当です。 /usr/lib/python2.6/distutils/__init__.py ファイルは、ファイルの上半分が切り捨てられるように中間式を開始します。

だから別のバージョンのPythonがインストールされていることを確認しましたpyversions -i

  File "/usr/lib/python2.6/ConfigParser.py", line 1
    .i,
    ^
SyntaxError: invalid syntax

私のファイルはすべてどうなりましたか?追加情報がなければ、この質問に回答するのは難しいことがわかりますが、このパスを進む前に他のものは影響を受けないと思う最初の代替ソリューションにコンテキストを切り替えます。

まず、質問です。アドインソフトウェア(またはより具体的にはPython)をインストールするための「正しい」場所はどこにありますか?私はaptを介してダウンロードしないアイテムを解凍してインストールするには、常に/ optを選択します。

次の質問は次のとおりです。

root@napajohn:/opt/python/Python-2.7.3# ./configure
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking machine type as reported by uname -m... armv7l
checking for --without-gcc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/opt/python/Python-2.7.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

私はgccを持っていませんか? ?さて、とにかくインストールします。アップデートを実行してから

root@napajohn:/opt/python/Python-2.7.3# apt-get install gcc-4.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gcc-4.4 : Depends: gcc-4.4-base (= 4.4.5-8) but 4.4.5-8em1 is to be installed
           Depends: cpp-4.4 (= 4.4.5-8) but 4.4.5-8em1 is to be installed
           Recommends: libc6-dev (>= 2.5) but it is not going to be installed
E: Broken packages

しかし、私はgcc-4.4-baseとcpp-4.4を持っています!

root@napajohn:/opt/python/Python-2.7.3# apt-get install gcc-4.4-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-4.4-base is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
root@napajohn:/opt/python/Python-2.7.3# apt-get install cpp-4.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
cpp-4.4 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

何度検索してみた結果、バージョン不一致(用語?)によって発生した可能性があると思いました。

ここでどこに行くのか分からない。より大きな質問は、ファイルの問題がPythonに関連していないかどうかです。fsckrootfsでディスクチェックを実行する必要がありますか?組み込みデバイスでこれをどのように実行しますか?

root@napajohn:/opt/python/Python-2.7.3# cat /etc/debian_version
6.0.4
root@napajohn:/opt/python/Python-2.7.3# df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   250876         0    250876   0% /lib/init/rw
udev                     10240       156     10084   2% /dev
tmpfs                   250876         0    250876   0% /dev/shm
rootfs                 7597856   1722208   5489688  24% /

ベストアンサー1

おすすめ記事