尝试安装 ideviceactivate 时无法运行“make”和“make install”

尝试安装 ideviceactivate 时无法运行“make”和“make install”

我无法ideviceactivate在 Ubuntu 16.4 上安装。我得到了克隆目录来自 github。当我运行时,make我得到了这个:

make -C src
make[1]: Entering directory '/home/dyrexion/Downloads/ideviceactivate-master/src'
gcc -o ideviceactivate ideviceactivate.c activate.c cache.c util.c -g -pthread -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -L/usr/local/lib -limobiledevice -lplist -lusbmuxd -lgthread-2.0 -lrt -lgnutls -ltasn1 -lxml2 -lglib-2.0 -lcurl
activate.c: In function ‘do_activation’:
activate.c:325:34: warning: passing argument 2 of ‘plist_to_xml’ from incompatible pointer type [-Wincompatible-pointer-types]
  plist_to_xml(activation_record, &xml, &len);
                                  ^
In file included from activate.c:26:0:
/usr/include/plist/plist.h:576:10: note: expected ‘char **’ but argument is of type ‘char ***’
     void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length);
          ^
activate.c:326:9: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char **’ [-Wformat=]
  printf("ACTIVATION RECORD:\n\n%s\n\n", xml);
         ^
cache.c: In function ‘cache_plist’:
cache.c:104:23: warning: passing argument 2 of ‘plist_to_xml’ from incompatible pointer type [-Wincompatible-pointer-types]
   plist_to_xml(plist, &xml, &len);
                       ^
In file included from cache.c:21:0:
/usr/include/plist/plist.h:576:10: note: expected ‘char **’ but argument is of type ‘char ***’
     void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length);
          ^
cache.c: In function ‘get_from_cache’:
cache.c:120:33: warning: passing argument 2 of ‘read_file’ from incompatible pointer type [-Wincompatible-pointer-types]
  read_file((const char *)fname, &d);
                                 ^
cache.c:48:5: note: expected ‘char *’ but argument is of type ‘char * (*)[2097152]’
 int read_file(const char *filename, char data[BUFSIZE])
     ^
cache.c:122:9: warning: function returns address of local variable [-Wreturn-local-addr]
  return (char *)d;
         ^
util.c: In function ‘buffer_read_from_filename’:
util.c:48:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
   printf("Unable to read %llu bytes from '%s'.\n", size, filename);
          ^
make[1]: Leaving directory '/home/dyrexion/Downloads/ideviceactivate-master/src'
dyrexion@dyrexion-Aspire-E1-531:~/Downloads/ideviceactivate-master$ sudo make
[sudo] password for dyrexion: 
Sorry, try again.
[sudo] password for dyrexion: 
make -C src
make[1]: Entering directory '/home/dyrexion/Downloads/ideviceactivate-master/src'
gcc -o ideviceactivate ideviceactivate.c activate.c cache.c util.c -g -pthread -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -L/usr/local/lib -limobiledevice -lplist -lusbmuxd -lgthread-2.0 -lrt -lgnutls -ltasn1 -lxml2 -lglib-2.0 -lcurl
activate.c: In function ‘do_activation’:
activate.c:325:34: warning: passing argument 2 of ‘plist_to_xml’ from incompatible pointer type [-Wincompatible-pointer-types]
  plist_to_xml(activation_record, &xml, &len);
                                  ^
In file included from activate.c:26:0:
/usr/include/plist/plist.h:576:10: note: expected ‘char **’ but argument is of type ‘char ***’
     void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length);
          ^
activate.c:326:9: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char **’ [-Wformat=]
  printf("ACTIVATION RECORD:\n\n%s\n\n", xml);
         ^
cache.c: In function ‘cache_plist’:
cache.c:104:23: warning: passing argument 2 of ‘plist_to_xml’ from incompatible pointer type [-Wincompatible-pointer-types]
   plist_to_xml(plist, &xml, &len);
                       ^
In file included from cache.c:21:0:
/usr/include/plist/plist.h:576:10: note: expected ‘char **’ but argument is of type ‘char ***’
     void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length);
          ^
cache.c: In function ‘get_from_cache’:
cache.c:120:33: warning: passing argument 2 of ‘read_file’ from incompatible pointer type [-Wincompatible-pointer-types]
  read_file((const char *)fname, &d);
                                 ^
cache.c:48:5: note: expected ‘char *’ but argument is of type ‘char * (*)[2097152]’
 int read_file(const char *filename, char data[BUFSIZE])
     ^
cache.c:122:9: warning: function returns address of local variable [-Wreturn-local-addr]
  return (char *)d;
         ^
util.c: In function ‘buffer_read_from_filename’:
util.c:48:10: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
   printf("Unable to read %llu bytes from '%s'.\n", size, filename);
          ^
make[1]: Leaving directory '/home/dyrexion/Downloads/ideviceactivate-master/src'

并且我可以t proceed tomake install ifmake` 未成功完成。这其中可能出了什么问题?

答案1

我在干净的 16.04 LTS 上没有遇到任何问题。

我做了以下事情:

sudo apt-get install git build-essential libcurl4-openssl-dev libplist-dev \
libimobiledevice-dev

cd ~/Downloads
git clone https://github.com/posixninja/ideviceactivate.git
cd ideviceactivate
make
sudo make install

然后就可以正常启动了:

$ ideviceactivate
No device found, is it plugged in?

相关内容