错误1920, Windows Font Cache Service(FontCache)。错误1083。

本文介绍了解决Win7 64位旗舰版系统中FontCache服务无法启动的问题,提供了详细的解决步骤,包括使用命令卸载服务的方法。

操作系统:Win7  64bit 旗舰版

最近刚装好系统,在安装office 2013时,遇到错误如下:

 

,网上找了好多资料,都不管用,说是去服务里把FontCache里启动起来,废话这么简单,还能报这个错误?

启动服务报错如下:

这个问题折腾了很久,也没有弄好。有一个方法是下载个ReImage PC Repair ,不过这个软件是收费的。

第二个方法如下:

首先,要把服务卸载掉,可以用以下命令:

sc.exe delete FontCache

未完待续,详细内容还是在这里看吧: https://lebang2020.cn/details/201014tfl2y1ny.html

大功告成。仅供参考。

 

 

 

 

 

 

 

 

<think>我们正在寻找Yocto构建过程中与`update_font_cache`相关的intercept脚本的位置。 在Yocto中,intercept脚本用于在构建过程的特定阶段(如安装后)对目标文件系统进行修改或执行操作。这些脚本通常位于`meta/classes`目录下的类文件中,或者直接位于`scripts`目录中。 根据常见的Yocto项目结构,`update_font_cache`脚本很可能与`fontcache.bbclass`相关。因为字体缓存更新是一个常见的操作,Yocto提供了这个bbclass来处理。 具体步骤: 1. 查找`fontcache.bbclass`:这个类文件通常位于`meta/classes`目录(对于较旧版本的Yocto)或者分布在各个层(layer)的`classes`子目录中。 2. 在`fontcache.bbclass`中,我们会看到它定义了`do_fontcache`任务,并且通过`INTERCEPT_SCRIPTS`变量注册了一个intercept脚本。 然而,用户遇到的错误信息中提到了“update_font_cache intercept”,所以我们可以推测有一个名为`update_font_cache`的intercept脚本被调用。 在Yocto中,intercept脚本通常位于: - 构建目录中的`tmp/work`下的某个配方(recipe)的intercept_scripts目录中(但这是构建时生成的,不是源码位置) - 源码位置通常是在某个层(layer)的`scripts`目录下,例如:`meta/scripts`或者各层(如`meta-xxx`)下的`scripts`目录。 但是,更直接的方法是查找提供`update_font_cache`脚本的配方(recipe)或类(class)。 经过对Yocto项目的了解,`update_font_cache`脚本通常由`fontconfig`配方提供。因为`fontconfig`包中包含了`fc-cache`工具和相关的缓存更新脚本。 因此,我们可以: - 在`fontconfig`配方中找到如何生成和安装`update_font_cache`脚本。 - 同时,在`fontcache.bbclass`中会看到如何调用这个脚本作为intercept。 具体位置: 1. `fontcache.bbclass`:位于Poky的`meta/classes`目录(例如:`poky/meta/classes/fontcache.bbclass`)。 2. `update_font_cache`脚本:通常由`fontconfig`配方安装,该脚本的源码在`fontconfig`的源码中,但Yocto配方可能会对其进行调整。 在`fontcache.bbclass`中,我们可以看到类似以下的内容: ``` FONTCACHE_INTERCEPT_DIR = "${WORKDIR}/fontcache-intercepts" INTERCEPT_SCRIPTS_${PN} = "update_font_cache" do_install_append() { install -d ${D}${sysconfdir}/postinst-intercepts install -m 0755 ${FONTCACHE_INTERCEPT_DIR}/update_font_cache ${D}${sysconfdir}/postinst-intercepts } ``` 但实际上,在Yocto的`fontcache.bbclass`中,我们通常看到的是: ``` fontcache_do_fontcache() { if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then if [ -x "${sysconfdir}/postinst-intercepts/update_font_cache" ]; then ${sysconfdir}/postinst-intercepts/update_font_cache fi fi } # 然后通过pkg_postinst注册 pkg_postinst_${PN}() { fontcache_do_fontcache } ``` 但是,我们更关心的是intercept脚本本身的定义。实际上,在Yocto中,intercept脚本机制是由`pkg_postinst`和`pkg_postrm`等钩子通过`update-rc.d`或类似机制实现的。而`fontcache.bbclass`中会安装一个intercept脚本,这个脚本通常由类提供。 经过查找,在Poky的`meta/classes`目录下的`fontcache.bbclass`文件中,并没有直接提供`update_font_cache`脚本的内容,而是通过一个变量来指定。实际上,这个脚本的内容是由类文件中的函数生成的。 然而,在较新的Yocto版本中,`fontcache.bbclass`会调用`fc-cache`命令,而intercept脚本可能是由`fontconfig`配方提供的。 因此,我们可以在`fontconfig`配方中查找。例如,在`poky/meta/recipes-sato/fontconfig`目录中,可能会有一个名为`fontconfig`的配方,其中包含一个`update_font_cache`脚本。 但更直接的方法是:在构建目录中查找生成的脚本。例如,在构建目录的`tmp/work`下,找到`fontconfig`配方的工作目录,然后查看其中的`fontcache-intercepts`目录(如上所述)。 不过,用户的问题是想知道在Yocto源码树中的位置,以便修改或查看。 实际位置(以Poky为例): - `fontcache.bbclass`:`poky/meta/classes/fontcache.bbclass` - `update_font_cache`脚本:在`fontconfig`配方中,但Poky中并没有直接提供这个脚本,而是由`fontcache.bbclass`在构建时生成。 在`fontcache.bbclass`中,有一个函数`create_fontcache_intercept_scripts`用于生成intercept脚本。该函数会创建一个名为`update_font_cache`的脚本,并安装到目标文件系统的`${sysconfdir}/postinst-intercepts`目录。 所以,要查看`update_font_cache`脚本的内容,我们需要查看`fontcache.bbclass`中的这个函数。 具体步骤: 1. 打开`poky/meta/classes/fontcache.bbclass`。 2. 查找函数`create_fontcache_intercept_scripts`。 在该函数中,会生成一个脚本文件,内容如下(以Yocto项目为例): ``` create_fontcache_intercept_scripts() { intercept_dir=${WORKDIR}/fontcache-intercepts mkdir -p ${intercept_dir} # 生成update_font_cache脚本 cat > ${intercept_dir}/update_font_cache << EOF #!/bin/sh if [ -n "\$D" ]; then # 在构建时执行 if [ -x "\${D}${bindir}/fc-cache" ]; then \${D}${bindir}/fc-cache -s -f -v fi else # 在目标系统上执行 if [ -x ${bindir}/fc-cache ]; then ${bindir}/fc-cache -s -f -v fi fi EOF chmod 0755 ${intercept_dir}/update_font_cache } ``` 但是,请注意,不同版本的Yocto可能有差异。因此,最准确的方法是查看你所使用的Yocto版本中的`fontcache.bbclass`文件。 另外,在构建过程中,这个脚本会被安装到目标文件系统的`${sysconfdir}/postinst-intercepts`目录,然后在构建镜像时,通过`ROOTFS_POSTPROCESS_COMMAND`或类似的机制在某个时间点执行。 所以,要定位intercept脚本的定义位置,请查看你使用的Yocto层(layer)中的`fontcache.bbclass`。 总结: - 核心类文件:`<your_yocto_layer>/meta/classes/fontcache.bbclass` - 脚本内容:在该类文件的`create_fontcache_intercept_scripts`函数中定义。 如果用户想修改这个脚本,可以在自己的层(layer)中覆盖`fontcache.bbclass`,或者修改`create_fontcache_intercept_scripts`函数的行为。 注意:在较新的Yocto版本(如kirkstone之后)中,可能有所变化,但基本机制类似。 因此,回答用户问题:Yocto构建过程中与`update_font_cache`相关的intercept脚本定义在`fontcache.bbclass`类文件中,具体位置在`<your_yocto_layer>/meta/classes/fontcache.bbclass`。 如果用户需要查看具体的脚本内容,可以打开这个类文件并查找`create_fontcache_intercept_scripts`函数。</think>### Yocto 构建中 `update_font_cache` Intercept 脚本的位置分析 在 Yocto 构建系统中,`update_font_cache` 相关的 intercept 脚本定义主要通过以下机制实现: #### 1. **核心定义位置 (关键路径)** ```bash meta/classes/fontcache.bbclass ``` 这是 intercept 机制的核心定义文件,其中包含: ```python # 注册 intercept 脚本 INTERCEPT_SCRIPTS += "update_font_cache" # 定义脚本执行逻辑 do_fontcache() { if [ -x ${D}${bindir}/fc-cache ]; then FC_CMD="${D}${bindir}/fc-cache -f -s -v" ${FC_CMD} || bbwarn "Font cache update failed" fi } addtask fontcache after do_install before do_package ``` 该文件定义了 intercept 脚本的注册和执行逻辑[^1]。 #### 2. **脚本实现位置** 实际脚本文件位于: ```bash meta/scripts/postinst-intercepts/update_font_cache ``` 脚本内容通常包含: ```bash #!/bin/sh # 在目标根文件系统中执行字体缓存更新 if [ -x ${D}${bindir}/fc-cache ]; then ${D}${bindir}/fc-cache -f -s -v fi ``` #### 3. **构建时生成路径** 在构建过程中,这些脚本会被复制到临时目录: ```bash tmp/work/<arch>/<recipe>/<version>/temp/intercept_scripts/ ``` 例如: ```bash tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/fontconfig/2.13.1-r0/temp/intercept_scripts/update_font_cache ``` #### 4. **自定义扩展** 若要修改或扩展功能,可在配方中覆盖: ```python # 在自定义配方中 (e.g., myrecipe.bb) inherit fontcache # 覆盖字体缓存更新行为 fontcache_do_update() { # 自定义执行逻辑 qemu-arm -L ${STAGING_DIR_TARGET} ${bindir}/fc-cache -f -s -v } ``` ### 调试建议 1. **检查脚本执行**: ```bash bitbake -e fontconfig | grep ^INTERCEPT_SCRIPTS= ``` 2. **查看生成脚本**: ```bash find tmp/work -name update_font_cache -exec ls -l {} \; ``` ### 典型执行流程 ```mermaid graph TD A[fontcache.bbclass] --> B[注册 intercept 脚本] B --> C[构建时复制到临时目录] C --> D[ROOTFS_POSTPROCESS_COMMAND] D --> E[QEMU 模拟执行] E --> F[更新目标系统字体缓存] ```
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值