一、异常错误
根据官方文档安装时Dash to Dock ,到Building这一步出错了
Building
Clone the repository or download the branch from github. A
simple Makefile is included.
Next use make to install the extension into your home directory. A
Shell reload is required Alt+F2 r Enter under Xorg or under Wayland
you may have to logout and login. The extension has to be enabled with
gnome-extensions-app (GNOME Extensions) or with dconf.
git clone https://github.com/micheleg/dash-to-dock.git
make -C dash-to-dock install
If msgfmt is not available on your system, you will see an error
message like the following:
make: msgfmt: No such file or directory
In this case install the gettext package from your distribution’s
repository.
yeats@yeats-virtual-machine:~/Tools$ git clone https://github.com/micheleg/dash-to-dock.git Cloning into 'dash-to-dock'... remote: Enumerating objects: 12011, done. remote: Counting objects: 100% (142/142), done. remote: Compressing objects: 100% (84/84), done. remote: Total 12011 (delta 69), reused 106 (delta 58), pack-reused 11869 Receiving objects: 100% (12011/12011), 7.78 MiB | 985.00 KiB/s, done. Resolving deltas: 100% (7841/7841), done. yeats@yeats-virtual-machine:~/Tools$ ls dash-to-dock
yeats@yeats-virtual-machine:~/Tools$ make -C dash-to-dock install make: Entering directory '/home/yeats/Tools/dash-to-dock' glib-compile-schemas ./schemas/ sassc --omit-map-comment _stylesheet.scss stylesheet.css make: sassc: Command not found make: *** [Makefile:98: stylesheet.css] Error 127 make: Leaving directory '/home/yeats/Tools/dash-to-dock'
二、原因
根据官方文档操作到make时出错的,发现主要原因是这句make输出
sassc --omit-map-comment _stylesheet.scss stylesheet.css make: sassc: Command not found
缺少sassc命令将_stylesheet.scss文件编译成stylesheet.css文件
三、解决方法
我尝试用安装Sassc的方式解决,但是安装后还是make失败,具体安装步骤参考这个文章在 Linux 上安裝 Sassc,效能比原生 Ruby Sass 快十倍!
于是我尝试找别的方法,发现网上一篇文章gnome 40 的"dash-to-dock"解决方案解决了问题
由于缺少stylesheet.css文件,我们通过克隆主线的方式复制该文件到/dash-to-dock下
git clone https://github.com/ewlsh/dash-to-dock.git ./dash-to-dock-master
cp ./dash-to-dock-master/stylesheet.css ./dash-to-dock/
复制到对应目录后,开始make,但又报了make: msgfmt: No such file or directory
这个错误
make: msgfmt: No such file or directory
根据官方文档的提示是,msgfmt在系统上不可用,,需要安装gettext,输入下面的命令安装即可
sudo apt-get install gettext
安装完成之后,发现可以make将扩展安装到您的主目录中,终于有效了
安装完成之后,在 Xorg 或 Wayland 下需要重新加载 Shell,按Alt+F2
,输入r
后,按Enter
然后需要注销并重新登录ubunut,在terminal中输入reboot即可
reboot
重启后打开tweak中的extensions,出现了Dash to Dock,表示成功安装