安装错误:“无法安装此加载项,因为它似乎已损坏". [英] Installation Error: "This add-on cannot be installed because it appears to be corrupted"

查看:762
本文介绍了安装错误:“无法安装此加载项,因为它似乎已损坏".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试学习如何开发Firefox附加组件,但是由于不幸,我什至在开始开发之前就遇到了问题.我下载了由Firefox开发人员团队提供的演示附加组件,称为"Borderify",可以在此处查看: GitHub .之后,我打开WinRar,并将文件夹转换为.XPI文件.但是,当我尝试在Firefox浏览器上手动安装它时,出现此消息此附件无法安装,因为它似乎已损坏".如果有人指出我做错了事,我将不胜感激.

I am currently trying to learn how to develop Firefox add-ons, but for my misfortune, I faced a problem before I even start doing so. I downloaded the demo add-on provided by the Firefox developer team which is called "Borderify" and can be seen here: GitHub. After that, I opened WinRar, and converted the folder to a .XPI file. However, when I try to install it manually on my Firefox browser I got this message "This add-on cannot be installed because it appears to be corrupted". I will be grateful if someone points what I've done wrong.

推荐答案

请注意,仅打包文件并将.ZIP文件重命名为.XPI才能安装它不起作用.如果要测试和调试扩展,则需要安装扩展暂时.为此,请转到about:debugging并单击 Load Temporary Add-on ,然后选择XPI文件以安装该附件.您还可以从源代码中加载该加载项,而无需将其打包到XPI中,只需选择它的manifest.json文件即可.

Note that just packing the files and renaming the .ZIP file to an .XPI to install it doesn't work. If you want to test and debug the extension, you need to install the extension temporarily. To do so, go to about:debugging and click Load Temporary Add-on, then choose the XPI file to install the add-on. You can also load the add-on from the sources without packing it to an XPI by simply choosing its manifest.json file.

要使XPI文件按预期安装,需要对其进行签名.当您将其发布在addons.mozilla.org上时,此操作会自动完成( AMO).

To get the XPI file to install as expected, it needs to be signed. This will be done automatically when you publish it on addons.mozilla.org (AMO).

这篇关于安装错误:“无法安装此加载项,因为它似乎已损坏".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆