我正在使用哈马丹主题。
它看起来是这样的: (在 Xubuntu 14.04 LTS 版本上搭载 XFCE 4.12)
由于某种原因,天气信息不会显示。
ashesh-pc1@A1315IN:~$
Conky: desktop window (1200003) is subwindow of root window (7c)
Conky: window type - normal
Conky: drawing to created window (0x2600001)
Conky: drawing to double buffer
sh: 1: curl: not found
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
cp: cannot stat ‘/home/ashesh-pc1/.harmattan-assets/photos/smallest/.png’: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
cp: cannot stat ‘/home/ashesh-pc1/.harmattan-assets/icons/small-#dcdcdc/.png’: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
cp: cannot stat ‘/home/ashesh-pc1/.harmattan-assets/icons/small-#dcdcdc/.png’: No such file or directory
grep: /home/ashesh-pc1/.cache/weather.xml: No such file or directory
cp: cannot stat ‘/home/ashesh-pc1/.harmattan-assets/icons/small-#dcdcdc/.png’: No such file or directory
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather-1.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather-1.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather-1.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather-1.png'
Conky: Unable to load image '/home/ashesh-pc1/.cache/weather.png'
我已经conky
安装了,在尝试安装时curl
,我收到以下消息:
ashesh-pc1@A1315IN:~$ sudo apt-get install curl
[sudo] password for ashesh-pc1:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
curl : Depends: libcurl3 (= 7.35.0-1ubuntu2.3) but 7.35.0-1ubuntu2.5 is to be installed
E: Unable to correct problems, you have held broken packages.
我也尝试过其他主题但它们产生了类似的问题。
我怎样才能解决这个问题?
答案1
如果尚未安装 Curl,您可能还需要获取它。
要安装,请使用以下命令:
sudo apt-get install curl
一旦您完全下载了
.zip
它,您需要解压它,并将里面的文件移动到您的主文件夹(/home/USERNAME
)。
您可能已经完成以下内容,如果还没有,请继续阅读。
这就是安装 Conky 主题所需的全部内容。但您需要编辑天气位置以匹配您自己的位置:
- 前往 weather.yahoo.com
- 在天气搜索框中搜索您的位置(预报下方)
- 复制 URL 中的数字字符串
- 在主文件夹中打开 .conkyrc
- 查找号码:“2294941”
- 将其替换为您从 Yahoo! 天气网址复制的数字字符串,保存
答案2
我无法在系统上使用 curl,我得到的可能的修复程序太多了,所以我最终决定使用wget
而不是curl
。
在这种情况下,程序curl
基本上从雅虎服务器获取天气信息并将其保存到您的磁盘,这也可以使用来完成wget
。
解决方法
1./home/yourusername/.conkyrc
使用文本编辑器打开文件,例如编辑或者鼠标垫。
2.查找类似以下内容的行:
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=2295411&u=c" -o ~/.cache/weather.xml}
并在其上方添加以下行:
${execi 300 wget "http://weather.yahooapis.com/forecastrss?w=2295411&u=c" --output-document=.cache/weather.xml}
因此,它看起来像这样:
${execi 300 wget "http://weather.yahooapis.com/forecastrss?w=2295411&u=c" --output-document=.cache/weather.xml}
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=2295411&u=c" -o ~/.cache/weather.xml}
3.保存文件,重启Conkypkill conky && conky
请注意,这里的“2295411”是 WOEID,根据位置不同而不同,您可以在此处找到您的 WOEIDYahoo WOEID 查询