Huaweiモデムソフトウェアをインストールしようとしています。しかし、インストールされていません。次のように表示されます。
bhaskar@bhaskar:~$ cd Desktop/driver
bhaskar@bhaskar:~/Desktop/driver$ Sudo ./install
old path =/usr/local/Mobile_Partner/driver
FATAL: Module option is in use.
DRIVER COPY START
STA_PATH_FLAG=.
STA_PATH_FULL=/home/bhaskar/Desktop/driver/install
START_PATH_DRIVER=/home/bhaskar/Desktop/driver
CURRENT install from ./install
INSTALL_PATH is not set ,auto install
INSTALL_PATH=/usr/local/Mobile_Partner
INSTALL_PATH is another path
rm /usr/local/Mobile_Partner/driver
DRIVER COPY END
ls: cannot access /etc/usb_modeswitch.d/: No such file or directory
/usr/local/Mobile_Partner/driver/ndis_driver
Error: missing module or filename.
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'cdc_ether': No such file or directory
Error: could not remove module cdc_ether: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'usbnet': Resource temporarily unavailable
Error: could not remove module usbnet: Resource temporarily unavailable
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'hw_cdc_driver': No such file or directory
Error: could not remove module hw_cdc_driver: No such file or directory
make -C src/ clean
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh "clean" "/lib/modules/3.8.0-19-generic/build/include/linux/usb"
rmmod -f hw_cdc_driver
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'hw_cdc_driver': No such file or directory
Error: could not remove module hw_cdc_driver: No such file or directory
make[1]: *** [clean] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [clean] Error 2
make -C src/ modules
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh "modules" "/lib/modules/3.8.0-19-generic/build/include/linux/usb"
make -C /lib/modules/3.8.0-19-generic/build SUBDIRS=/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src modules
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
CC [M] /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_ncm_prefer_32’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:113:1: warning: return from incompatible pointer type [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_ncm_prefer_crc’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:116:1: warning: return from incompatible pointer type [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_rt_debug’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:128:1: warning: return from incompatible pointer type [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘hw_change_mtu’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:899:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘rx_tlp_parse’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:1085:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘tx_complete’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:1663:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘cdc_ncm_config’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2036:24: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2037:3: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2037:3: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2041:21: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2057:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘hw_cdc_probe’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2589:3: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o] Error 1
make[2]: *** [_module_/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [modules] Error 2
make -C src/ install
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#install -m 744 -c hw_cdc_driver.o /lib/modules/3.8.0-19-generic/kernel/drivers/usb/net
#depmod -a
#modprobe hw_cdc_driver
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh "install"
modprobe hw_cdc_driver
FATAL: Module hw_cdc_driver not found.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [install] Error 2
Install NDIS driver failed.
The compiling environment is not all ready.
Please check gcc, make and kernel buid(/lib/modules/3.8.0-19-generic/build) to be all installed?
Now please enter any key to finish other installations.
lNDIS is disabled, and only Modem can be used.
TARGET_PATH =
TARGET_PATH =
have usb_modeswitch rules to HUAWEI DataCard: COUNT=0
ADDRUNLEVEL=/etc/rc4.d
‘/etc/rc4.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc4.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
ADDRUNLEVEL=/etc/rc5.d
‘/etc/rc5.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc5.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
ADDRUNLEVEL=/etc/rc2.d
‘/etc/rc2.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc2.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
ADDRUNLEVEL=/etc/rc3.d
‘/etc/rc3.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc3.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
bhaskar@bhaskar:~/Desktop/driver$
この問題を解決する方法を教えてください。他のバージョンのモバイルパートナーソフトウェアで試しました。問題はすべて同じです。
おかげで、バスカー
問題はここにあります:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2589:3: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
別のHuaweiモデムドライバーでも同様の問題が発生し、ソースコードを修正しました。
まず、hw_cdc_driver.c
ファイルがどこにあるかを調べましょう。 ~/Desktop/driver
ディレクトリ内のすべてのファイルでfile
コマンドを実行します。
file *
それらのいくつかが「7-Zipアーカイブデータ」ファイルであることがわかります。内容を確認するには、それぞれに対して7z l
を実行します。
7z l data.bin
ファイルが多すぎるので、探しているファイルに対してgrep
だけを実行できます。
7z l data.bin | grep hw_cdc_driver.c
見つかった場合は、アーカイブを抽出する必要があります。
mkdir data_bin
mv data.bin data_bin
cd data_bin
7z x data.bin
rm data.bin
これで、data_bin
ディレクトリにアーカイブの内容ができました。 hw_cdc_driver.c
ファイルを検索して開き、2589行(エラーからの行)に移動します。 dbg
(その前に//
を追加)を含む行をコメント化し、ファイルを保存して閉じます。
変更したファイルでアーカイブをパックするには、7z
を再度使用します。
cd data_bin
7z a data.bin data_bin
mv data.bin ..
これで、data.bin
を固定ファイルに置き換えました。もう一度インストールしてください。