公告

Gentoo交流群:87709706 欢迎您的加入

#1 站务处理 » 关于社区发展规划 » 昨天 23:49:54

batsom
回复: 0

为了社区以后长远发展,本人有一个设想:
1:管理团队只能是在校大学生.
2:团队负责人四年一轮换,也就是说大一的时候就得进入,顺利通过一年的考评,就负责社区规划,大四就开始物色新的负责人
3:原管理团队卸任后可以进入社区后援团,指导新人和发表一些个人见解.
4:社区打算建立几个部门

原因有一下几点:
1:IT行业本来加班就严重,进入社会的人几乎没时间经常安装系统和软件,而且这个对能力也没啥提升,不利于后续发展.
2:如果大学生系统学习linux底层技术,有利于以后发展,而且相同爱好的人一起学习,很多事都是事半功倍
3:后援团进入社会精力都在工作,结合工作可以发表一下关于内核的资料.

目前打算把社区负责人交给semes,我本人就安心学习和发布OS技术,当然欢迎大家一起参与讨论这个问题!

如果想参与社区管理团队的人请说下自己大学名字和年级

#2 Re: 安装问题 » x11-drivers/nvidia-drivers-525.89.02 » 2023-03-17 12:40:57

目前解决办法
解决办法更换内核版本+更换驱动版本

linux内核版本6.1 会有问题

#3 新手园地 » gentoo使用三方ebuild 安装gentoo-kernel-6.2.6 » 2023-03-16 14:19:10

batsom
回复: 0

一、创建一个OVERLAY:

mkdir -p /var/batsom_ebuilds
linux

echo PORTDIR_OVERLAY="/var/batsom_ebuilds" >> /etc/portage/make.conf
git

二、准备目录与文件:github

mkdir -p /var/batsom_ebuilds/app-editors/gentoo-kernel (文件夹名字一定要注意)



mkdir -p /var/batsom_ebuilds/metadata

在metadata下建一个文件layout.conf,内容为masters=gentoo



mkdir -p /var/batsom_ebuilds/profiles

在profiles下建一个文件repo_name,内容为gentoo-kernel-6.2.6



三、建立ebuild文件:

下载 gentoo-kernel-6.2.6.ebuild 到 该目录下

四、创建manifest

ebuild gentoo-kernel-6.2.6.ebuild digest

会在atom-editor下生成Manifest文件,每次gentoo-kernel-6.2.6.ebuild修改,都要从新生成。

五、安装

好了,能够用emerge  app-editors/gentoo-kernel安装程序试试了。

#4 Re: 站务处理 » 管理团队招募 » 2023-03-09 13:40:48

用户名,申请Gentoo中文社区管理员
个人擅长

操作系统,Linux(主Arch,Gentoo,Debian),Windows
语言: C++, Python, Java, JS, (今年目标Bash和Lua)
软件: Vim, Blender, Krita, (常见办公软件就不列举了哈~)
特点:热爱思考,有无限的问题的解决问题的热情;有实用型专利,创新能力还算可以吧(\^v^/)

23年目标

    使用Linux成功搭建所有的个人服务器(主要方向,物联网服务,云数据服务)
    浅浅掌握Linux Kernel知识,完成简单Kernel裁剪
    熟练使用Bash和Lua
    熟练OpenCV
    在安全技术方面更进一步

% 来自Ling的管理员申请,浅浅的介绍,满满的热情,Biu~~

#5 Re: 安装问题 » x11-drivers/nvidia-drivers-525.89.02 » 2023-03-06 23:13:25

nurali 说:

妥妥水贴,拉出去斩了

正在找解决办法

#6 安装问题 » x11-drivers/nvidia-drivers-525.89.02 » 2023-03-01 13:01:18

batsom
回复: 3

* Messages for package x11-drivers/nvidia-drivers-525.89.02:

* Could not find a Makefile in the kernel source directory.
* Please ensure that /usr/src/linux points to a complete set of Linux sources
* Unable to calculate Linux Kernel version for build, attempting to use running version
* Could not find a usable .config in the kernel source directory.
* Please ensure that /usr/src/linux points to a configured set of Linux sources.
* If you are using KBUILD_OUTPUT, please set the environment var so that
* it points to the necessary object directory so that it might find .config.
* ERROR: x11-drivers/nvidia-drivers-525.89.02::gentoo failed (setup phase):
*   Kernel not configured; no .config found in
*
* Call stack:
*                         ebuild.sh, line 136:  Called pkg_setup
*   nvidia-drivers-525.89.02.ebuild, line 122:  Called linux-mod_pkg_setup
*                  linux-mod.eclass, line 550:  Called require_configured_kernel
*                 linux-info.eclass, line 360:  Called die
* The specific snippet of code:
*           die "Kernel not configured; no .config found in ${KV_OUT_DIR}"
*
* If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-525.89.02::gentoo'`,
* the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-525.89.02::gentoo'`.
* The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-525.89.02/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-525.89.02/temp/die.env'.
* Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-525.89.02/empty'
* S: '/var/tmp/portage/x11-drivers/nvidia-drivers-525.89.02/work'

#7 新手园地 » linux如何挂载硬盘linux服务器上挂载磁盘 » 2023-02-07 12:50:10

batsom
回复: 1

博主最近在研究服务器运维,由于Linux服务器相对比较困难,所以博主对她情有独钟。而window服务器几乎跟我们平常使用的电脑一样,相对简单感觉索然无味。下面正式进入主题教大家linux如何挂载硬盘。

首先解答一个新手朋友都会问的问题,而且这些问题在百度上面好像找不到很合适的答案。

Linux服务器要挂载硬盘原因是什么?不挂载磁盘可以吗?

Linux服务器要挂载硬盘的原因主要有以下几点:

1、Linux服务器在默认情况下,所有的东西都是装在系统盘。系统盘的空间有限,如果站点和数据较多很容易把空间撑满,导致环境和数据库等等服务启动不了。

2、Linux服务器挂载磁盘可以避免因为系统损坏导致网站数据丢失。

3、Linux服务器挂载硬盘可以更合理的使用储存资源,因为不挂载默认所有东西装系统盘(类似电脑的c盘),导致其他数据盘闲置。比如你有200G的硬盘:系统盘20G、数据盘180G,如果不挂载硬盘那么只能用20G的系统盘,另外180G的数据盘无法使用,造成空间的巨大浪费。

了解具体原因请看另外一篇文章:Linux服务器为什么要挂载硬盘?

下面如何来挂载Linux服务器的硬盘教程开始:

挂载硬盘(磁盘)的方法博主收集了两种,全部介绍给大家。

第一种方法:使用工具自动挂载硬盘(博主强烈推荐使用这种方法,简单又不会出错)两分钟可以搞定。

使用磁盘自动挂载工具,支持Centos、Ubuntu、Debian、Fedora。

注意: 请在安装面板之前挂载磁盘,否则程序将直接跳过挂载过程。

Centos/Fedora:

yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

Ubuntu:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh

Debian:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

程序说明:

1、本工具默认将数据盘挂载到/www目录

2、若服务器上已存在/www目录,为了您的数据安全,挂载工具会自动跳过

3、若您的服务器之前安装过Windows系统,需要手动删除NTFS分区,挂载工具会直接跳过NTFS分区

4、若您的磁盘已分区,且未挂载,工具会自动将分区挂载到/www

5、若您的磁盘是新磁盘,工具会自动分区并格式化成ext4文件系统

6、本工具只自动挂载一个分区,若您有多块数据盘,请手动挂载未被自动挂载的磁盘

7、若要挂载到其它目录,请在第一个参数传入目录名

第二种方法:手动挂载硬盘(博主不推荐使用,因为手动挂载很容易出现未知错误而且很耗时间),下面把方法贴出来大家可以参考参考。

声明:主流服务器上面的磁盘主要有三种命名方式:/dev/xvdb 、 /dev/sdb、 /dev/vdb。文中的磁盘名称/dev/vdb为作者的测试服务器上的命名,请大家以自己的磁盘为准进行修改。

1、检查网站的磁盘状态,确认是否有没有分区的磁盘。

fdisk -l


如果没有分区请看另外一篇文章:Linux服务器磁盘分区命令(图解)执行磁盘分区操作,分区完毕完成以下步骤。

2、格式化分区

mkfs.ext4 /dev/vdb(xvdb1)


3、分区挂载添加到开机启动挂载。

echo “/dev/vdb /www ext4 defaults 0 0” >> /etc/fstab

4、重新挂载所有分区

mount -a

5、最后检查磁盘是否挂载成功

df

#8 新手园地 » 运行locale指令 » 2023-02-04 14:28:28

batsom
回复: 0

一、locale的五脏六腑

1、 语言符号及其分类(LC_CTYPE)
2、 数字(LC_NUMERIC)
3、 比较和排序习惯(LC_COLLATE)
4、 时间显示格式(LC_TIME)
5、 货币单位(LC_MONETARY)
6、 信息主要是提示信息,错误信息, 状态信息, 标题, 标签, 按钮和菜单等(LC_MESSAGES)
7、 姓名书写方式(LC_NAME)
8、 地址书写方式(LC_ADDRESS)
9、 电话号码书写方式(LC_TELEPHONE)
10、度量衡表达方式(LC_MEASUREMENT)
11、默认纸张尺寸大小(LC_PAPER)
12、对locale自身包含信息的概述(LC_IDENTIFICATION)。

二、理解locale的设置

设定locale就是设定12大类的locale分类属性,即 12个LC_*。除了这12个变量可以设定以外,为了简便起见,还有两个变量:LC_ALL和LANG。

它们之间有一个优先级的关系:LC_ALL > LC_* > LANG

可以这么说,LC_ALL是最上级设定或者强制设定,而LANG是默认设定值。

#9 安装问题 » v2rayA安裝 » 2023-02-04 09:36:34

batsom
回复: 0

emerge --ask v2rayA

其他問題参考论坛相关帖子

proxy.golang.org 无法访问的问题:

go get 报错:dial tcp 172.217.160.113:443: i/o timeout解决方案

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

#10 安装问题 » 安装谷歌浏览器 » 2023-02-02 14:33:21

batsom
回复: 0

emerge --ask google-chrome

安装完毕,点击图标无反应,

执行:
batsom-rd ~ # google-chrome-stable
[28956:28956:0202/131355.918645:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

添加--no-sandbox
google-chrome-stable --no-sandbox

不过启动Chrome浏览器时弹出“You are using an unsupported command-line flag –ignore-certificate-errors. Stability and security will suffer”:

添加--test-type
正常了

更改
vim /usr/bin/google-chrome-stable

exec -a "$0" "$HERE/chrome" --no-sandbox --test-type "$@"

还有一个问题,无法汉化,正在找解决办法

#11 Re: 安装问题 » Gentoo 安装eclipse » 2023-02-02 14:04:20

经查看源码,发现
vim /var/db/repos/eclipse/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.1.ebuild
第四行:
EAPI=5

vim /var/db/repos/gentoo/eclass/eutils.eclass 存在一下判断条件
case ${EAPI} in
    6) inherit desktop edos2unix epatch eqawarn estack ltprune multilib \
            preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper ;;
    7) inherit edos2unix strip-linguas wrapper ;;
    *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac


造成程序无法执行

#12 安装问题 » Gentoo 安装eclipse » 2023-02-02 13:36:56

batsom
回复: 1

/usr/lib/python3.10/site-packages/portage/package/ebuild/_config/KeywordsManager.py:86: UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead
  warnings.warn(

* IMPORTANT: 17 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies - * ERROR: dev-util/eclipse-sdk-bin-4.5.2-r2::eclipse failed (depend phase):
*   eutils: EAPI 5 not supported
*
* Call stack:
*                         ebuild.sh, line 628:  Called source '/var/db/repos/eclipse/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r2.ebuild'
*   eclipse-sdk-bin-4.5.2-r2.ebuild, line   6:  Called inherit 'eutils' 'versionator' 'java-utils-2'
*                         ebuild.sh, line 308:  Called __qa_source '/var/db/repos/gentoo/eclass/eutils.eclass'
*                         ebuild.sh, line 123:  Called source '/var/db/repos/gentoo/eclass/eutils.eclass'
*                     eutils.eclass, line  19:  Called die
* The specific snippet of code:
*       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
*
* If you need support, post the output of `emerge --info '=dev-util/eclipse-sdk-bin-4.5.2-r2::eclipse'`,
* the complete build log and the output of `emerge -pqv '=dev-util/eclipse-sdk-bin-4.5.2-r2::eclipse'`.
* Working directory: '/usr/lib/python3.10/site-packages'
* S: '/var/tmp/portage/dev-util/eclipse-sdk-bin-4.5.2-r2/work/eclipse-sdk-bin-4.5.2'
\ * ERROR: dev-util/eclipse-sdk-bin-4.5.1::eclipse failed (depend phase):
*   eutils: EAPI 5 not supported
*
* Call stack:
*                      ebuild.sh, line 628:  Called source '/var/db/repos/eclipse/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.1.ebuild'
*   eclipse-sdk-bin-4.5.1.ebuild, line   6:  Called inherit 'eutils' 'versionator' 'java-utils-2'
*                      ebuild.sh, line 308:  Called __qa_source '/var/db/repos/gentoo/eclass/eutils.eclass'
*                      ebuild.sh, line 123:  Called source '/var/db/repos/gentoo/eclass/eutils.eclass'
*                  eutils.eclass, line  19:  Called die
\ * The specific snippet of code:
*       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
*
* If you need support, post the output of `emerge --info '=dev-util/eclipse-sdk-bin-4.5.1::eclipse'`,
* the complete build log and the output of `emerge -pqv '=dev-util/eclipse-sdk-bin-4.5.1::eclipse'`.
* Working directory: '/usr/lib/python3.10/site-packages'
* S: '/var/tmp/portage/dev-util/eclipse-sdk-bin-4.5.1/work/eclipse-sdk-bin-4.5.1'
* ERROR: dev-util/eclipse-sdk-bin-4.5.0-r4::eclipse failed (depend phase):
*   eutils: EAPI 5 not supported
*
* Call stack:
/ *                         ebuild.sh, line 628:  Called source '/var/db/repos/eclipse/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.0-r4.ebuild'
*   eclipse-sdk-bin-4.5.0-r4.ebuild, line   6:  Called inherit 'eutils' 'versionator' 'java-utils-2'
*                         ebuild.sh, line 308:  Called __qa_source '/var/db/repos/gentoo/eclass/eutils.eclass'
*                         ebuild.sh, line 123:  Called source '/var/db/repos/gentoo/eclass/eutils.eclass'
*                     eutils.eclass, line  19:  Called die
* The specific snippet of code:
*       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
*
* If you need support, post the output of `emerge --info '=dev-util/eclipse-sdk-bin-4.5.0-r4::eclipse'`,
* the complete build log and the output of `emerge -pqv '=dev-util/eclipse-sdk-bin-4.5.0-r4::eclipse'`.
* Working directory: '/usr/lib/python3.10/site-packages'
* S: '/var/tmp/portage/dev-util/eclipse-sdk-bin-4.5.0-r4/work/eclipse-sdk-bin-4.5.0'
... done!

emerge: there are no ebuilds to satisfy ">=dev-java/icu4j-56.1:56".
(dependency required by "dev-util/eclipse-sdk-bin-4.6.2-r1::eclipse" [ebuild])
(dependency required by "dev-util/eclipse-sdk-bin" [argument])

#13 新手园地 » Gentoo升级系统的标准步骤 » 2023-02-01 14:25:44

batsom
回复: 0

#emerge --sync      //升级整个portage目录

#emerge portage     //如果不是最新的portage,需要按提示执行此操作

#emerge python     //如果不是最新的python,需要按提示执行此操作

###(执行报错)
#/usr/sbin/update-python     //执行完emerge python后执行此操作

#emerge -avuDN world      //按照 /var/lib/portage/world 文件下的包,重新构建整个系统

参数说明:  --ask (-a)  控制Portage显示它要更新的软件包列表,并让您决定是否继续更新

--verbose (-v) 在屏幕上输出完整的文件列表

--update (-u) 更新包的最佳版本

--deep (-D)  更新系统中的每个软件包

--newuse (-N) USE标记变更后,要使Portage检查USE标记的变动是否导致

需要安装新的软件包或者将现有的包重新编译

#emerge -av --depclean     //清除不需要(孤立)的软件包

#revdep-rebuild     //gentoolkit包里面的一个软件,用来检查系统的依赖关系是否都满足,

自动安装没有满足关系的包

#dispatch-conf     //更新系统的配置文件

#emerge -e world     //本地重新编译整个系统,USE标记变化不大时不需执行 参数说明: --emptytree (-e)

#14 Re: 安装问题 » Gentoo安装Fcitx(保持最新安装) » 2023-02-01 00:17:41

以上安装方式已经过时,请参考官网安装办法

#15 安装问题 » 输入法安装异常 » 2023-01-31 19:20:39

batsom
回复: 0

按照网上文档安装异常

#16 Re: 安装问题 » 安装微信和qq(保持最新安装) » 2023-01-31 13:10:09

微信点击无反应,解决办法

运行:
batsom-rd ~ # weixin-uos
[0131/120842.228823:FATAL:electron_main_delegate.cc(298)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/opt/weixin-uos/weixin.sh: line 8: 19577 Trace/breakpoint trap   /opt/weixin-uos/weixin

vim /opt/weixin-uos/weixin.sh
/opt/weixin-uos/weixin 后面添加  --no-sandbox

#17 Re: 新手园地 » 求助:基于livecd安装的系统,不能完全变成中文 » 2023-01-30 16:02:29

nano -w /etc/locale.gen

en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8

locale-gen

设置一个Locale显示中文
/etc/env.d/02locale

LANG="zh_CN.UTF-8"
LC_COLLATE="C"

在~/.bashrc中设置用户级的系统locale
export LANG="zh_CN.UTF-8"
export LC_COLLATE="C"

env-update && source /etc/profile

#18 安装问题 » Gentoo安装Fcitx(保持最新安装) » 2023-01-30 01:16:39

batsom
回复: 1

Fcitx 5正在开发中,前一段时间尝试安装过一次,但基本不能用。

前几天Yuking说装上基本能用了,于是前天开始在Gentoo中尝试。

gentoo-zh中有两个版本,先尝试的带日期的版本,基本的包都没问题,就是kcm-fcitx5始终编译不过去,没法配置,于是切换到arch中,安装好,把配置拿过来,基本能用了。

后来在群里问Yuking,不在线,想想不行就试试纯git版本的,结果一切顺利,kcm-fcitx5也装上了。

安装也很简单:添加accept_keyword,emerge完设置一下就行了。

cat > /etc/portage/package.accept_keywords/fcitx5 << "EOF"
=app-i18n/fcitx5-999999999 **
=app-i18n/kcm-fcitx5-99999999 **
=app-i18n/fcitx5-qt-9999999999 **
=app-i18n/fcitx5-chinese-addons-999999999 **
=app-i18n/libime-99999999 **
=x11-libs/xcb-imdkit-99999999999 **
=app-i18n/cldr-emoji-annotation-9999 **
EOF

emerge -avq libime xcb-imdkit cldr-emoji-annotation fcitx5 kcm-fcitx5 fcitx5-qt fcitx5-chinese-addons

cat > ~/.xprofile << "EOF"
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS="@im=fcitx"
EOF
cp /usr/share/applications/fcitx5.desktop ~/.config/autostart/

使用了两天的初步体会:

1、设置项很多,没细研究,多数默认,只修改了一下字号和列表数量;

2、五笔输入还算流畅,自动调整输入顺序,貌似原来的4无法自动调整,不知道是不是原来设置的问题;

3、不能连续输入了,也就是五笔有候选词时输入下一个无法自动上屏,应该是设置问题,回头再好好研究一下;

4、有时输入过快,字母会直接上屏。

另:arch中安装,可见CS Slayer的 如何现在就在 Arch Linux 用上 Fcitx 5

#19 安装问题 » 安装微信和qq(保持最新安装) » 2023-01-30 00:37:25

batsom
回复: 1

Gentoo - 添加gentoo-zh overlay:
gentoo-china-overlay和gentoo-***-overlay目前合并成了gentoo-zh,并且这三个overlay都已经进入了gentoo官方layman数据库。

所以:

- sudo emerge -avt layman

- sudo layman -L 可以查询overlay列表

- sudo layman -a gentoo-zh

- 编辑/etc/portage/make.conf,添加:source /var/lib/layman/make.conf(需要至少添加了一个overlay之后才会有这个make.conf)

事实上,emerge layman之后,就会有一些打印告诉我们上述的步骤。


执行 emerge weixin-uos 报错:
!!! All ebuilds that could satisfy "weixin-uos" have been masked.
!!! One of the following masked packages is required to complete your request:
- net-im/weixin-uos-2.1.5::gentoo-zh (masked by: ~amd64 keyword)

解决办法:
echo "net-im/weixin-uos **" >> /etc/portage/package.keywords

qq同上
echo "net-im/tencent-qq **" >> /etc/portage/package.keywords

#20 安装问题 » gnome-terminal无法正常启动 » 2023-01-29 17:16:07

batsom
回复: 0

gnome-terminal点击后转圈后无反应


解决办法:
我这边是编码问题

更改/etc/env.d/02locale
zh_CN.GBK 改为 zh_CN.UTF-8
LANG="zh_CN.UTF-8"

#21 Re: 安装问题 » gnome 编译出错 » 2023-01-29 16:09:56

解决办法:
开启ccahe

make.conf添加:
FEATURES="ccahe -test"
CCACHE_DIR="/var/tmp/ccache"

重新编译 报下面问题
UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 4280: illegal multibyte sequence

更改/etc/locale.gen

注释:zh_CN.GBK GBK

运行locale-gen命令,生成locale:

重新编译通过

#22 新手园地 » Gentoo:关于ccache的使用 » 2023-01-29 15:59:30

batsom
回复: 0

发现自己脑子挺笨的,一个ccache,gentoo文档上就写了那么点,今天才终于明白了

列一下安装使用步骤吧:

代码 3.1: 安装ccache

# emerge ccache

激活Portage支持

打开/etc/Portage/make.conf并添加ccache到FEATURES变量。然后添加一个新的变量CCACHE_SIZE并设置它为"2G":

代码 3.2: 在/etc/Portage/make.conf中设定CCACHE_SIZE

CCACHE_SIZE="2G"

最后,在make.conf中加上

CCACHE_DIR="/var/tmp/ccache"

这样就算基本安装好了,很简单吧

使用的时候,其缓存的内容分为两种:portage中的包编译时候的缓存和非portage中的包编译时候的缓存。当你编译portage的包的时候,其缓存的数据,存储在上面的CCACHE_DIR变量指定的文件夹中:"/var/tmp/ccache"中,因为/var/tmp/ccache是Portage的默认ccache主目录(我想你当然也可以把默认目录改成别的)。

如果你要编译的是非portage中的包,那么你要对上面的步骤在补充一步操作:

(官方内容):

添加/usr/lib/ccache/bin到您PATH参数里靠前的位置(在/usr/bin之前)。这一点可以通过编辑在您用户主目录中的.bash_profile文件来实现。使用.bash_profile是定义PATH参数的一个方式.

老实说,我是没找到我的目录下的.bash_profile文件,所以我选择修改/etc/profile中的PATH变量

我加了这样一句:PATH="/usr/lib/ccache/bin:/opt/bin:${PATH}"
你编译非portage中的包的时候,其缓存数据是默认存储在:${HOME}/.ccache中的,就是你的用户目录下面.ccache目录,我是root登录,所以在我的/root/下有一个.ccache目录,这里面就是我们编译非portage中的包的缓存数据

这样,我们才算彻底配置好了ccache了

那么下面是如何使用的方法了。其实使用,也就是查看他有没有缓存编译的数据

编译非portage得包的时候直接输入:

ccache -s就可以看到数据结果了,以我的为例:

cache directory                     /root/.ccache
        cache hit                             33
        cache miss                          2030
        called for link                      144
        not a C/C++ file                       6
        files in cache                      4060
        cache size                          44.9 Mbytes
        max cache size                     976.6 Mbytes

看起来还是比较一目了然的。

那如果你在编译portage的包的时候要查看这些数据,就要指定上面我们说的portage的默认文件夹了,输入:

CCACHE_DIR="/var/tmp/ccache" ccache -s  (这里查看的就是portage默认文件夹的缓存数据结果了)

结果:

cache directory                     /var/tmp/ccache
        cache hit                              0
        cache miss                             0
        files in cache                         0
        cache size                             0 Kbytes
        max cache size                       2.0 Gbytes

看到了,我们刚才设置过他的缓存大小为:2GB的,我并没有编译portage的包,所以,上面的数据都是

终于算搞明白这个东西了,乌拉~~~~~~

#23 安装问题 » gnome 编译出错 » 2023-01-29 02:58:03

batsom
回复: 1

emerge -av gnome

ninja: build stopped: subcommand failed.
* ERROR: net-libs/webkit-gtk-2.38.3::gentoo failed (compile phase):
*   ninja -v -j5 -l0 failed
*
* Call stack:
*     ebuild.sh, line  136:  Called src_compile
*   environment, line 3968:  Called cmake_src_compile
*   environment, line 1782:  Called cmake_build
*   environment, line 1751:  Called eninja
*   environment, line 2206:  Called die
* The specific snippet of code:
*       "$@" || die -n "${*} failed"
*
* If you need support, post the output of `emerge --info '=net-libs/webkit-gtk-2.38.3::gentoo'`,
* the complete build log and the output of `emerge -pqv '=net-libs/webkit-gtk-2.38.3::gentoo'`.
* The complete build log is located at '/var/tmp/portage/net-libs/webkit-gtk-2.38.3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/net-libs/webkit-gtk-2.38.3/temp/environment'.
* Working directory: '/var/tmp/portage/net-libs/webkit-gtk-2.38.3/work/webkitgtk-2.38.3_build'
* S: '/var/tmp/portage/net-libs/webkit-gtk-2.38.3/work/webkitgtk-2.38.3'

#24 Re: 安装问题 » bochs安装报错 » 2023-01-29 00:08:01

Gentoo下常见masked解决方法小结


    masked by: missing keyword
    masked by: package.mask
    masked by: xxx license(s)

masked by: missing keyword

以app-i18n/ibus-table-wubi-9999为例。

!!! All ebuilds that could satisfy "app-i18n/ibus-table-wubi" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-i18n/ibus-table-wubi-9999 (masked by: missing keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

在手册上的说明如下:
“missing keyword”意味着这个软件还没有在您机器的体系结构中进行过测试。
您可以咨询相应体系结构移植小组是否能对它进行测试,
或者您自己为他们进行这样的测试并将您得到的结论提交到我们的bugzilla网站。

解决思路,修改/etc/portage/package.keywords,强制标记为稳定。

解决方法,将形如

$OPERATOR$APP_NAME-$VERSION $ARCH_KEYWORD

字段添加到/etc/portage/package.keywords。

对应上例为:

=app-i18n/ibus-table-wubi-9999 **

如果您不知道KEYWORDS该如何写,可以先看一下被masked的包的KEYWORD:

less `equery w app-i18n/ibus-table-wubi`

如果看到的是

KEYWORDS=""

则使用“**”作为ARCH_KEYWORD,“**”表示该包没有keyword。

其他的“~x86”之类,照抄即可。
masked by: package.mask

以sys-kernel/gentoo-sources-2.6.33为例。

!!! All ebuilds that could satisfy "=sys-kernel/gentoo-sources-2.6.33" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-kernel/gentoo-sources-2.6.33 (masked by: package.mask)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

解决思路,修改/etc/portage/package.unmask,强制标记为稳定。

解决方法,
在/etc/portage/package.unmask里添加

=sys-kernel/gentoo-sources-2.6.33

masked by: xxx license(s)

以dev-java/sun-jre-bin-1.6.0.17为例。

!!! The following installed packages are masked:
- dev-java/sun-jre-bin-1.6.0.17 (masked by: dlj-1.1 license(s))
A copy of the 'dlj-1.1' license is located at '/usr/portage/licenses/dlj-1.1'.

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

解决思路,修改/etc/make.conf,降低许可敏感级别。

解决方法,
在/etc/make.conf里追加一行

ACCEPT_LICENSE="*"

Last modified by anonymous on 04/03/2010 10:27:28 AM ( ago)

#25 安装问题 » bochs安装报错 » 2023-01-28 20:32:53

batsom
回复: 1

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "bochs" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-emulation/bochs-9999::gentoo (masked by: missing keyword)
- app-emulation/bochs-2.7::gentoo (masked by: ~amd64 keyword)
- app-emulation/bochs-2.6.10::gentoo (masked by: ~amd64 keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

页脚

Powered by FluxBB