使用.deb软件包,我有一种非常奇怪的行为。
当我尝试使用dpkg -i package.deb进行安装时,出现此错误:
iPadAir:/tmp root# dpkg -i packagename.deb
(Reading database ... 4239 files and directories currently installed.)
Preparing to replace packagename 0.0.0-0 (using packagename.deb) ...
Unpacking replacement packagename ...
dpkg: error processing packagename.deb (--install):
unable to create `PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite': No such file or directory
dpkg-deb: subprocess paste killed by signal (Broken pipe: 13)
Errors were encountered while processing:
packagename.deb
但.deb文件包含不同的路径! 正确的路径是/ Library / Application Support / PACKAGENAME:
iPadAir:/tmp root# dpkg-deb -c packagename.deb
drwxr-xr-x dok/staff 0 2014-11-20 12:46 ./
drwxr-xr-x dok/staff 0 2014-11-20 12:46 ./Library/
drwxr-xr-x dok/staff 0 2014-11-20 12:46 ./Library/Application Support/
drwxr-xr-x dok/staff 0 2014-11-20 12:46 ./Library/Application Support/PACKAGENAME/
drwxr-xr-x dok/staff 0 2014-11-20 12:46 ./Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/
-rw-r--r-- dok/staff 184320 2014-11-20 12:46 ./Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite
使用debug(1100,'因为我只需要文件系统输出)我甚至遇到了奇怪的情况:
iPadAir:/tmp root# dpkg -D1110 -i packagename.deb
D000010: ensure_pathname_nonexisting `/var/lib/dpkg/tmp.ci'
(Reading database ... 4239 files and directories currently installed.)
[....]
[All directories are correctly processed and created...]
[....]
D000010: tarobject ti->Name=`./Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist' Mode=644 owner=501.20 Type=48(-) ti->LinkName=`' namenode=`/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist' flags=2 instead=`<none>'
D000100: setupvnamevbs main=`/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist' tmp=`/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist.dpkg-tmp' new=`/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist.dpkg-new'
D000100: tarobject nonexistent
D000010: ensure_pathname_nonexisting `/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist.dpkg-new'
D000010: ensure_pathname_nonexisting `/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist.dpkg-tmp'
D000100: tarobject NormalFile[01] open size=479
D000100: tarobject new - no backup
D000100: tarobject done and installed
D000010: tarobject ti->Name=`PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite' Mode=644 owner=501.20 Type=48(-) ti->LinkName=`' namenode=`/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite' flags=2 instead=`<none>'
D000100: setupvnamevbs main=`/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite' tmp=`/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-tmp' new=`/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-new'
D000100: tarobject nonexistent
D000010: ensure_pathname_nonexisting `/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-new'
D000010: ensure_pathname_nonexisting `/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-tmp'
dpkg: error processing packagename.deb (--install):
unable to create `PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite': No such file or directory
D000010: cu_installnew `/PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite' flags=2
D000100: setupvnamevbs main=`//PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite' tmp=`//PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-tmp' new=`//PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-new'
D000100: cu_installnew not restoring
D000100: unlinkorrmdir `//PACKAGENAME/AviarySDKResources.bundle/AviaryContentPackCompiledDatabase.sqlite.dpkg-new' rmdir No such file or directory
D000010: cu_installnew `/Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist' flags=52
D000100: setupvnamevbs main=`//Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist' tmp=`//Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist.dpkg-tmp' new=`//Library/Application Support/PACKAGENAME/AviarySDKResources.bundle/AviaryColorPalatte.plist.dpkg-new'
正如您所见,dpkg尝试在&#39; root&#39;中创建目录PACKAGENAME目录而不是&#39; / Library / Application Support&#39;。 我试图重建我的debian包但没有任何改变(是的,debian包在tar存档中有正确的路径)。
有人可以帮助我吗?
Tnx很多
PS:即使你看到iPadAir,我在ubuntu盒子上尝试了相同的dpkg命令。同样的错误:(
答案 0 :(得分:1)
经过数周的研究,我终于发现我正在使用一个有缺陷的dpkg-deb版本(1.13.25)。更新到最新版本(目前为1.14.25)后,所有错误都消失了!
答案 1 :(得分:0)
如果有人因为面临同样的问题而停下来:
dpkg-deb: error: unable to create temporary directory: No such file or directory
可能是因为无法正确访问/tmp
文件夹。它在服务器上被意外删除,因此dpkg-deb
无法存储临时文件。
所以只需恢复它:
mkdir /tmp
chmod 1777 /tmp