-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
344 lines (296 loc) · 41.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html><html lang="["zh-CN","zh-tw","en","default"]" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>空空 如也 (´・ω・`)? - 一个什么都没有的地方</title><meta name="keywords" content="笔记、随想、琐琐碎碎的东西"><meta name="author" content="oooo26"><meta name="copyright" content="oooo26"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="一个什么都不会的家伙">
<meta property="og:type" content="website">
<meta property="og:title" content="空空 如也 (´・ω・`)?">
<meta property="og:url" content="https://oooo26.github.io/index.html">
<meta property="og:site_name" content="空空 如也 (´・ω・`)?">
<meta property="og:description" content="一个什么都不会的家伙">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:author" content="oooo26">
<meta property="article:tag" content="笔记、随想、琐琐碎碎的东西">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://oooo26.github.io/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: true
},
runtime: '天',
date_suffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"top-center"},
source: {
jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
},
fancybox: {
js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '空空 如也 (´・ω・`)?',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2022-04-17 10:39:52'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><meta name="generator" content="Hexo 6.0.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">11</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">9</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">2</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/img/home.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">空空 如也 (´・ω・`)?</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">空空 如也 (´・ω・`)?</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/oooo26" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:huangjh256@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2022/04/16/tutorial-install-r-package/" title="R语言小记 | 安装R包"> <img class="post_bg" src="/img/default_cover_2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="R语言小记 | 安装R包"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/04/16/tutorial-install-r-package/" title="R语言小记 | 安装R包">R语言小记 | 安装R包</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-04-16T08:04:23.000Z" title="发表于 2022-04-16 16:04:23">2022-04-16</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/r/">r</a></span></div><div class="content">
近两个月写毕业论文去了,鸽了。现在重新开更,一时间也想不出要水点什么,就写一下之前遇到的一个R包安装的小问题吧。
一般安装
不同于其他语言,R有着高度集权的管理体系,至少我目前遇到的几乎所有包都要在cran上找(当然也有从源码安装),并且R语言的IDE基本等价于Rstudio(其他都不够好用)。
文档虽然有很多换皮网站,比如Rdocument和Rdrr,但其内容都是从cran的包简介里面扒的。咳咳,扯远了。。
总而言之,我一直认为R包的安装都是统一的:
1> install.packages("{PACKAGE_NAME}")
最多就是加入了一些参数:
12# 安装包及其依赖项> install.packages("{PACKAGE_NAME}", dependencies=T)
而一般的包确实如此,所以安装流程很懒人:
搜索cran上有没有这个包
用install.packages安装
特殊情况(以pcalg为例)
然而,从来如此,便对么?
最近我才发现,R包居然确实可以不由cran提 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2022/02/16/tutorial-pybind/" title="C++/Python联合编译:pybind11"> <img class="post_bg" src="/img/default_cover_2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="C++/Python联合编译:pybind11"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/02/16/tutorial-pybind/" title="C++/Python联合编译:pybind11">C++/Python联合编译:pybind11</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-02-16T04:59:44.000Z" title="发表于 2022-02-16 12:59:44">2022-02-16</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/C/">C++</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/tags/Python/">Python</a></span></div><div class="content">
Python方便但效率低,C++效率高但不方便,那不如把他们合起来用?
本篇介绍Python作为API、C++作为底层实现的方式之一:pybind11.
想要联合编译Python和C++有很多种方法和工具,我目前在用的是pybind11,给我感觉挺方便好用的。
安装pybind11
对于Linux来说,如果官方源里面有的话,可以直接从官方源安装,如:
1$ sudo pacman -S pybind11
否则可以根据官方文档安装,但强烈不建议PyPI里的包(功能不完全)!
再退一步,不装也没关系,直接把它源码从Github仓库扒下来,后面会讲到要怎么用:
1$ git clone https://github.com/pybind/pybind11.git
联合编译
方式一:setuptools [link]
这种方式相对传统(但常用),利用的是Python的打包工具setuptools(一般默认装了),可以利用pip进行管理。
示例目录如下:
123456.├── pyproject.toml├── setup.py└── src ├── bind.cpp └── m ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2022/01/24/tutorial-archinstall-2/" title="Arch折腾记 | 安装Windows/Arch双系统(二)"> <img class="post_bg" src="/img/default_cover_5.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Arch折腾记 | 安装Windows/Arch双系统(二)"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/01/24/tutorial-archinstall-2/" title="Arch折腾记 | 安装Windows/Arch双系统(二)">Arch折腾记 | 安装Windows/Arch双系统(二)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-01-24T02:48:27.000Z" title="发表于 2022-01-24 10:48:27">2022-01-24</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/arch/">arch</a></span></div><div class="content">
终于要整图形化界面啦!
上回说到,我们已经成功安装了Arch Linux到硬盘里,但它仍然处于黑框命令行的形式,想作为日常使用的机子显然是不够的,再怎么说也得整个图形界面出来吧。
写在最前
配置图形界面,难免可能写错配置文件,这有可能导致进入图形界面后卡死,但又因为没法进入命令行而无法修复。因此建议:
在全部配置完成之前,不要打开图形界面的自启动,以免出了问题也进不了命令行;
假如打开了图形界面自启,卡死了,也不用慌。重新插入启动盘,从启动盘进入系统,挂载分区,并通过arch-chroot进入命令行进行修复;
选择图形界面
图形界面有很多选择,我这里介绍的是KDE Plasma,其他的界面配置就请自行查看wiki了。
首先需要安装xorg依赖包,以及显卡驱动,具体请看这个说明:
1$ sudo pacman -S xorg-server xf86-video-intel mesa lib32-mesa
最后一个lib32-mesa包可能会找不到,需要启用multilib仓库:在/etc/pacman.conf里面找到如下行,并取消前面的注释:
12[multilib]Incl ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2022/01/23/tutorial-archinstall-1/" title="Arch折腾记 | 安装Windows/Arch双系统(一)"> <img class="post_bg" src="/img/default_cover_1.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Arch折腾记 | 安装Windows/Arch双系统(一)"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/01/23/tutorial-archinstall-1/" title="Arch折腾记 | 安装Windows/Arch双系统(一)">Arch折腾记 | 安装Windows/Arch双系统(一)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-01-23T05:01:33.000Z" title="发表于 2022-01-23 13:01:33">2022-01-23</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/arch/">arch</a></span></div><div class="content">
想用Arch Linux做开发,但又不想干掉Windows?那装个双系统吧~
本篇内容主要基于Arch - Installation Guide及这篇很不错的博客,写在前面表示感谢。
数据无价,请备份好重要数据再搞机。
预留新系统的空间
首先需要给你的Arch预留出空间,这个主要看你的使用情况,对我来说100G左右完全够了(不玩游戏,不跑机器学习,没有大型数据库)。
在Windows的“磁盘管理”中可以进行硬盘的压缩。预留出的空间应该是灰色的,表示没有被启用。
制作启动盘
启动盘,一般推荐使用一个8G以上的U盘,因为除了镜像本体外,安装过程中的缓存文件也需要在启动盘的空间上保存,所以越大越好。
制作方式多种多样,我使用的工具是Ventoy,非常傻瓜式:
下载安装Ventoy;
下载所需系统的iso镜像;
插入U盘,打开Ventoy,用它来格式化U盘(原有数据会被清空);
将iso复制进格式化后的U盘里,可以复制多个;
制作完成。
没了。
关闭安全启动(secure boot)
值得注意的是,无论是Arch Linux的安装,还是我用到Veotoy启动盘,都不支持安全启动(s ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2022/01/21/tutorial-vcbuildtool/" title="Windows折腾记 | Microsoft Visual C++工具安装"> <img class="post_bg" src="/img/default_cover_6.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Windows折腾记 | Microsoft Visual C++工具安装"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/01/21/tutorial-vcbuildtool/" title="Windows折腾记 | Microsoft Visual C++工具安装">Windows折腾记 | Microsoft Visual C++工具安装</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-01-21T09:19:15.000Z" title="发表于 2022-01-21 17:19:15">2022-01-21</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/windows/">windows</a></span></div><div class="content">
写代码还是用Linux吧。。省心
最近在给一台新电脑配置编译环境,因为测试要用,整的是windows系统,实在让人不省心。
废话不多说,总之本篇重点就是要整在编译Python包(底层涉及C++代码)时的这个错误:
123error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
这里“14.0”理论上也可能提示其他版本,总之没差,问题就在于少了个叫Microsoft Visual C++的编译工具。
为什么要装这玩意
不知道有没有人关注过为什么Windows下编译Python需要这玩意(其实我也没关注),但实际上在Python的官方Wiki上有这个说明。总而言之就是在Windows下没有内置(完善的)C++编译器,所以需要自行安装:
Visual C++
CPython
14.X
3.5, 3.6, ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2022/01/03/tutorial-clash/" title="Arch折腾记 | clash安装"> <img class="post_bg" src="/img/default_cover_3.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Arch折腾记 | clash安装"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/01/03/tutorial-clash/" title="Arch折腾记 | clash安装">Arch折腾记 | clash安装</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-01-03T15:31:27.000Z" title="发表于 2022-01-03 23:31:27">2022-01-03</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/arch/">arch</a></span></div><div class="content">
本篇不涉及机场/节点,也并不是科学上网教程。只是因为Arch官网上的clash教程实在太简洁,所以记录一下我捣鼓这玩意的过程。
Clash主程序安装
安装主程序非常简单,如官网所说,我们只需要安装官方源里的包就好了:
1$ sudo pacman -S clash
然后手动下载一个叫Country.mmdb的玩意,咱也不用了解这是什么个原理,但如果想出去得用到这玩意就是了。下好之后放到~/.config/clash里(可能要新建文件夹)。
123456$ mkdir -p ~/.config/clash$ cd ~/.config/clash# 阿里源$ wget http://www.ideame.top/mmdb/Country.mmdb# Github Release (国内网络可能不稳)$ wget https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb
然后可以把clash的配置文件xxx.yaml放到上面的文件夹里面,名字建议使用config.yaml,毕竟这样就 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/12/08/tutorial-pkgbuild-1/" title="Arch折腾记 | PKGBUILD怎么写"> <img class="post_bg" src="/img/default_cover_4.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Arch折腾记 | PKGBUILD怎么写"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/12/08/tutorial-pkgbuild-1/" title="Arch折腾记 | PKGBUILD怎么写">Arch折腾记 | PKGBUILD怎么写</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-12-08T13:04:57.000Z" title="发表于 2021-12-08 21:04:57">2021-12-08</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/arch/">arch</a></span></div><div class="content">
自安装了ArchLinux以来,准确的来说是从AUR安装东西以来,就一直想学PKGBUILD的写法。但是因为太懒没有动力,就一直拖着。直到最近想装个东西,但它没提供Arch包,这才整了整活。
跟着其他教程弄了半天,总算装上能用了,但写得肯定不够规范,以后有空了再更新吧~
PKGBUILD和AUR
使用ArchLinux的朋友可能不陌生,AUR(Arch User Repository)是一个用户自行打包、分享软件的平台,其安全性和稳定性虽然没法保证。但一般来说,只要安装有人气的包就没大问题。对于官方来说,也会将符合一些条件的包收录到官方库里面去。是ArchLinux社区的重要组成部分(这说法好官方哈哈哈哈哈)。
这无穷无尽的软件想要都塞给官方来保存,人又不是网盘,顶不住这么折腾,于是PKGBUILD就是一个很好的解决方式。
简单来说,PKGBUILD这个文件(对,它只是一个文本文件罢了)负责记录:
从哪来:软件数据从哪里下载
到哪去:怎么安装,安装到哪
大陆网络有时会发现无法下载AUR的包,如果不是PKGBUILD写错了,那么很大概率是连不上作者指定的下载源(你懂的)
...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/12/03/tutorial-hexo-2/" title="Hexo建个站玩儿 | 第二期 - 弄好看点"> <img class="post_bg" src="/img/default_cover_6.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hexo建个站玩儿 | 第二期 - 弄好看点"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/12/03/tutorial-hexo-2/" title="Hexo建个站玩儿 | 第二期 - 弄好看点">Hexo建个站玩儿 | 第二期 - 弄好看点</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-12-03T06:46:14.000Z" title="发表于 2021-12-03 14:46:14">2021-12-03</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/hexo/">hexo</a></span></div><div class="content">欸欸,就是玩儿~</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/12/03/tutorial-linux-software/" title="软件安装汇总 | Linux/WSL"> <img class="post_bg" src="/img/default_cover_2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="软件安装汇总 | Linux/WSL"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/12/03/tutorial-linux-software/" title="软件安装汇总 | Linux/WSL">软件安装汇总 | Linux/WSL</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-12-03T03:11:11.000Z" title="发表于 2021-12-03 11:11:11">2021-12-03</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/Linux/">Linux</a><span class="article-meta__link">•</span><a class="article-meta__tags" href="/tags/%E8%BD%AF%E4%BB%B6/">软件</a></span></div><div class="content">
本篇汇总了站内用到的各种Linux下软件的安装,主要是利用命令行,因此一些基本的命令行语法不会做过多解释。一般来说,我会以我自己的系统(Ubuntu 20.04)为例给出详细步骤,对于其他平台请参考我给出的其他教程链接(尽量都会附上的,没有的话就算了)。
部分教程需要科学上网工具,请尽量自备
Git
这个看官方教程就好,实际上就是从Linux官方源里下:
1$ sudo apt install git
利用git --version查看版本,以确认安装成功。
Node.js
方案一:通过nvm安装
Node Version Manager(简称nvm)是一个十分方便的Node.js管理器,可以很方便地进行安装、卸载、版本切换等,其官方地址在此。
首先需要安装nvm,这里只放命令行安装:
12# "v0.39.0" is the latest now$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
重启命令行,然后可以通过nvm -v查看安装版本, ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/12/01/tutorial-hexo-1/" title="Hexo建个站玩儿 | 第一期 - 弄出个网站来"> <img class="post_bg" src="/img/default_cover_5.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hexo建个站玩儿 | 第一期 - 弄出个网站来"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/12/01/tutorial-hexo-1/" title="Hexo建个站玩儿 | 第一期 - 弄出个网站来">Hexo建个站玩儿 | 第一期 - 弄出个网站来</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-12-01T13:53:51.000Z" title="发表于 2021-12-01 21:53:51">2021-12-01</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%AC%94%E8%AE%B0/">笔记</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/hexo/">hexo</a></span></div><div class="content">欸,就是玩儿~</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">oooo26</div><div class="author-info__description">一个什么都不会的家伙</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">11</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">9</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">2</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/oooo26"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/oooo26" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:huangjh256@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/04/16/tutorial-install-r-package/" title="R语言小记 | 安装R包"><img src="/img/default_cover_2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="R语言小记 | 安装R包"/></a><div class="content"><a class="title" href="/2022/04/16/tutorial-install-r-package/" title="R语言小记 | 安装R包">R语言小记 | 安装R包</a><time datetime="2022-04-16T08:04:23.000Z" title="发表于 2022-04-16 16:04:23">2022-04-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/16/tutorial-pybind/" title="C++/Python联合编译:pybind11"><img src="/img/default_cover_2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="C++/Python联合编译:pybind11"/></a><div class="content"><a class="title" href="/2022/02/16/tutorial-pybind/" title="C++/Python联合编译:pybind11">C++/Python联合编译:pybind11</a><time datetime="2022-02-16T04:59:44.000Z" title="发表于 2022-02-16 12:59:44">2022-02-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/01/24/tutorial-archinstall-2/" title="Arch折腾记 | 安装Windows/Arch双系统(二)"><img src="/img/default_cover_5.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Arch折腾记 | 安装Windows/Arch双系统(二)"/></a><div class="content"><a class="title" href="/2022/01/24/tutorial-archinstall-2/" title="Arch折腾记 | 安装Windows/Arch双系统(二)">Arch折腾记 | 安装Windows/Arch双系统(二)</a><time datetime="2022-01-24T02:48:27.000Z" title="发表于 2022-01-24 10:48:27">2022-01-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/01/23/tutorial-archinstall-1/" title="Arch折腾记 | 安装Windows/Arch双系统(一)"><img src="/img/default_cover_1.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Arch折腾记 | 安装Windows/Arch双系统(一)"/></a><div class="content"><a class="title" href="/2022/01/23/tutorial-archinstall-1/" title="Arch折腾记 | 安装Windows/Arch双系统(一)">Arch折腾记 | 安装Windows/Arch双系统(一)</a><time datetime="2022-01-23T05:01:33.000Z" title="发表于 2022-01-23 13:01:33">2022-01-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/01/21/tutorial-vcbuildtool/" title="Windows折腾记 | Microsoft Visual C++工具安装"><img src="/img/default_cover_6.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Windows折腾记 | Microsoft Visual C++工具安装"/></a><div class="content"><a class="title" href="/2022/01/21/tutorial-vcbuildtool/" title="Windows折腾记 | Microsoft Visual C++工具安装">Windows折腾记 | Microsoft Visual C++工具安装</a><time datetime="2022-01-21T09:19:15.000Z" title="发表于 2022-01-21 17:19:15">2022-01-21</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
<i class="fas fa-folder-open"></i>
<span>分类</span>
</div>
<ul class="card-category-list" id="aside-cat-list">
<li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E5%85%B6%E4%BB%96/"><span class="card-category-list-name">其他</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E7%AC%94%E8%AE%B0/"><span class="card-category-list-name">笔记</span><span class="card-category-list-count">10</span></a></li>
</ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/C/" style="font-size: 1.1em; color: #999">C++</a> <a href="/tags/Linux/" style="font-size: 1.1em; color: #999">Linux</a> <a href="/tags/Python/" style="font-size: 1.1em; color: #999">Python</a> <a href="/tags/arch/" style="font-size: 1.5em; color: #99a9bf">arch</a> <a href="/tags/hexo/" style="font-size: 1.3em; color: #99a1ac">hexo</a> <a href="/tags/r/" style="font-size: 1.1em; color: #999">r</a> <a href="/tags/windows/" style="font-size: 1.1em; color: #999">windows</a> <a href="/tags/%E8%BD%AF%E4%BB%B6/" style="font-size: 1.1em; color: #999">软件</a> <a href="/tags/%E9%9A%8F%E6%83%B3/" style="font-size: 1.1em; color: #999">随想</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/04/"><span class="card-archive-list-date">四月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">二月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/01/"><span class="card-archive-list-date">一月 2022</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/12/"><span class="card-archive-list-date">十二月 2021</span><span class="card-archive-list-count">5</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">11</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2021-11-30T16:00:00.000Z"></div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-04-17T02:39:52.223Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2020 - 2022 By oooo26</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="chat_btn" type="button" title="rightside.chat_btn"><i class="fas fa-sms"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><script>var preloader = {
endLoading: () => {
document.body.style.overflow = 'auto';
document.getElementById('loading-box').classList.add("loaded")
},
initLoading: () => {
document.body.style.overflow = '';
document.getElementById('loading-box').classList.remove("loaded")
}
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function subtitleType () {
if (true) {
var typed = new Typed("#subtitle", {
strings: "一个什么都没有的地方罢了".split(","),
startDelay: 300,
typeSpeed: 150,
loop: false,
backSpeed: 50
})
} else {
document.getElementById("subtitle").innerHTML = '一个什么都没有的地方罢了'
}
}
if (true) {
if (typeof Typed === 'function') {
subtitleType()
} else {
getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
}
} else {
subtitleType()
}</script></div><script defer="defer" id="fluttering_ribbon" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = false;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="false"></script><script>((window.gitter = {}).chat = {}).options = {
disableDefaultChat: true,
};
document.addEventListener('gitter-sidecar-ready', (e) => {
const GitterChat = e.detail.Chat
let chat
function initGitter () {
chat = new GitterChat({
room: 'oooo26/hexo',
activationElement: '#chat_btn'
});
}
initGitter()
if (false) {
document.addEventListener('pjax:complete', () => {
chat.destroy()
initGitter()
})
}
})</script><script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async="async" defer="defer"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>