我尝试使用macdeployqt部署mac应用程序。它过去像魅力一样工作,但由于我使用自制软件来获取我的库,部署不起作用,抛出了很多(400+)这样的行:
ERROR: "install_name_tool: can't open input file: Joker.app/Contents/Frameworks//libavformat.54.63.104.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 0 in file: Joker.app/Contents/Frameworks//libavformat.54.63.104.dylib for writing (Bad file descriptor)
如果我在/ usr / local / lib上运行ls -l
,我就得到了这个:
lrwxr-xr-x 1 thomas admin 54 5 fév 12:40 libavformat.54.63.104.dylib -> ../Cellar/ffmpeg/1.2.4/lib/libavformat.54.63.104.dylib
在/usr/local/Cellar/ffmpeg/1.2.4/lib中:
-r--r--r-- 1 thomas admin 9787252 5 fév 12:40 libavcodec.54.92.100.dylib
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libavcodec.54.dylib -> libavcodec.54.92.100.dylib
-r--r--r-- 1 thomas admin 9949304 5 fév 12:40 libavcodec.a
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libavcodec.dylib -> libavcodec.54.92.100.dylib
-r--r--r-- 1 thomas admin 61120 5 fév 12:40 libavdevice.54.3.103.dylib
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libavdevice.54.dylib -> libavdevice.54.3.103.dylib
-r--r--r-- 1 thomas admin 25616 5 fév 12:40 libavdevice.a
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libavdevice.dylib -> libavdevice.54.3.103.dylib
-r--r--r-- 1 thomas admin 684428 5 fév 12:40 libavfilter.3.42.103.dylib
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libavfilter.3.dylib -> libavfilter.3.42.103.dylib
-r--r--r-- 1 thomas admin 1135720 5 fév 12:40 libavfilter.a
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libavfilter.dylib -> libavfilter.3.42.103.dylib
-r--r--r-- 1 thomas admin 1179128 5 fév 12:40 libavformat.54.63.104.dylib
lrwxr-xr-x 1 thomas admin 27 5 fév 12:40 libavformat.54.dylib -> libavformat.54.63.104.dylib
-r--r--r-- 1 thomas admin 2098824 5 fév 12:40 libavformat.a
lrwxr-xr-x 1 thomas admin 27 5 fév 12:40 libavformat.dylib -> libavformat.54.63.104.dylib
-r--r--r-- 1 thomas admin 151636 5 fév 12:40 libavresample.1.1.0.dylib
lrwxr-xr-x 1 thomas admin 25 5 fév 12:40 libavresample.1.dylib -> libavresample.1.1.0.dylib
-r--r--r-- 1 thomas admin 171816 5 fév 12:40 libavresample.a
lrwxr-xr-x 1 thomas admin 25 5 fév 12:40 libavresample.dylib -> libavresample.1.1.0.dylib
-r--r--r-- 1 thomas admin 189152 5 fév 12:40 libavutil.52.18.100.dylib
lrwxr-xr-x 1 thomas admin 25 5 fév 12:40 libavutil.52.dylib -> libavutil.52.18.100.dylib
-r--r--r-- 1 thomas admin 242496 5 fév 12:40 libavutil.a
lrwxr-xr-x 1 thomas admin 25 5 fév 12:40 libavutil.dylib -> libavutil.52.18.100.dylib
-r--r--r-- 1 thomas admin 149772 5 fév 12:40 libpostproc.52.2.100.dylib
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libpostproc.52.dylib -> libpostproc.52.2.100.dylib
-r--r--r-- 1 thomas admin 118880 5 fév 12:40 libpostproc.a
lrwxr-xr-x 1 thomas admin 26 5 fév 12:40 libpostproc.dylib -> libpostproc.52.2.100.dylib
-r--r--r-- 1 thomas admin 122164 5 fév 12:40 libswresample.0.17.102.dylib
lrwxr-xr-x 1 thomas admin 28 5 fév 12:40 libswresample.0.dylib -> libswresample.0.17.102.dylib
-r--r--r-- 1 thomas admin 123944 5 fév 12:40 libswresample.a
lrwxr-xr-x 1 thomas admin 28 5 fév 12:40 libswresample.dylib -> libswresample.0.17.102.dylib
-r--r--r-- 1 thomas admin 347800 5 fév 12:40 libswscale.2.2.100.dylib
lrwxr-xr-x 1 thomas admin 24 5 fév 12:40 libswscale.2.dylib -> libswscale.2.2.100.dylib
-r--r--r-- 1 thomas admin 425640 5 fév 12:40 libswscale.a
lrwxr-xr-x 1 thomas admin 24 5 fév 12:40 libswscale.dylib -> libswscale.2.2.100.dylib
drwxr-xr-x 11 thomas admin 374 5 fév 12:40 pkgconfig
所以问题似乎与权限有关,但覆盖Brew权限似乎是一种不好的做法。还有其他办法吗?