页次: 1
自己写了个 PKGBUILD 自己用,在运行的时候提示
╭─root at server in ~/nginx 22-09-15 - 0:01:44
╰─○ makepkg -si
==> 错误: 不能使用 root 用户运行 makepkg,
因为可能会系统造成灾难性的损坏。
本机的 arch 我自然是用的普通用户,没有这个问题
但这个因为是我给云服务器也装的是arch(不怕死),且服务器仅为个人使用,所以不想另开普通账户,就单独使用 root 账户,怎么无视这个错误强制以 root 身份执行 makepkg -si 呢?
最近编辑记录 nibazshab (2022-09-15 15:42:53)
离线
我记得之前有个--root选项的吧,你加上试试
上学中
离线
我云服务器上还是用的普通用户,不过 sudo 免密,危险操作就自己加 sudo, 免得误操作了。
离线
开个新用户呗,又不麻烦。
离线
我记得之前有个--root选项的吧,你加上试试
╭─root at server in ~/nginx 22-09-15 - 12:34:29
╰─○ makepkg -si --root
makepkg: 无效选项 '--root'
╭─root at server in ~/nginx 22-09-15 - 12:34:31
╰─○ makepkg -si
==> 错误: 不能使用 root 用户运行 makepkg,
因为可能会系统造成灾难性的损坏。
╭─root at server in ~/nginx 22-09-15 - 12:34:33
╰─○ makepkg --root -si
makepkg: 无效选项 '--root'
不行
离线
开个新用户呗,又不麻烦。
看来是得开个新用户了,找不到解决方法
离线
http://allanmcrae.com/2015/01/replacing-makepkg-asroot/
自pacman 4.2.0 --asroot就被移除了
https://gitlab.archlinux.org/pacman/pac … aster/NEWS
4.2.0 - symlinks to directories on the filesystem are no longer
treated as directories
- pacman-db-upgrade - fix local database for files installed
into directory symlinks
- added --assume-installed option to help upgrades where not all
installed packages have been rebuilt
- --unrequired now filters needed optdepends too. Use twice
to only filter direct dependencies
- improved dependency resolving ensures correct ordering when
installing updates (FS#32764)
- A new configure keyword Usage can limit what operations a
repository is used for
- NoExtract and NoUpgrade can use inverted pattern matches
(FS#31749)
- Group queries can be filtered with --explicit/--deps (FS#19716)
- Filesystem checking now only produces a warning for altered
backup files (FS#34739)
- pacman prints a warning if an installed directory has different
permission to that already on the filesystem (FS#34740)
- both current and new versions are displayed when querying
updates
- --print-format now implies --print
- package scriptlets are not run when using --dbonly
- invalid option combinations cause pacman to abort (FS#20950)
- improve output when a package is missing a required signature
(FS#28014)
- PGP signature key IDs are listed with -Sii (FS#34742)
- indicate ignored packages in -Qu output
- use appropriate file size units with -Si/-Qi
- plugged several memory leaks
- read filelists from a packages .MTREE file if possible
- ensure packages have all the required metadata before installing
(FS#35514)
- always remove lock file on exit (FS#35603)
- fix overflow in integrity checking progress bar (FS#36608)
- ensure downloads use correct filename even if the mirror uses a
redirect (FS#36791)
- cache PGP key IDs during availability checking (FS#38042)
- fix reading responses with leading whitespace (FS#39976)
- fix potential issues when handling of UTF8 filenames
(FS#40805, FS#40762)
- makepkg:
- PKGBUILDs can now specify architecture specific sources,
dependencies, etc.
- A .SRCINFO file is added to source packages for easy parsing
- VCS package building attempts to be incremental (FS#35050)
- bzr sources can have a '+' in them (FS#35244)
- allow sources containing "::"
- add --noprepare option
- add -C/--cleanbuild option (FS#17175)
- add --noarchive option
- remove --asroot and enforce fakeroot usage
- all PKGBUILDs require a package() function
- PKGBUILDs can no longer be read from stdin
- enable make style environmental overrides
- Read CARCH environmental variable (FS#35030)
- makedepends and checkdepends are installed together (FS#31557)
- added support for sha224 checksums (FS#36776)
- remove warning when license is not specified in PKGBUILD
(FS#37011)
- only remove static libraries if they have a shared version
- prevent makepkg creating armored signatures (FS#38503)
- support stripping kernel modules
- support the kernel.org PGP signing scheme (FS#31592)
- sign created source package when using --sign
- enforce source signatures to be trusted or have their full
fingerprint listed in the validpgpkeys array of the PKGBUILD
- look for configuration in XDG_CONFIG_HOME/pacman/makepkg.conf
(FS#43030)
- ensure vcs tools are available when source entries require
them
- disallow pkgver/pkgrel/epoch overrides in split packages
- improve parsing of PKGBUILD variables (FS#40361)
- makepkg-template - new package build templating utility
(FS#10375)
- repo-add:
- add option to remove package files from disk
- contrib:
- checkupdates: rename CHECKUPDATE_DB to CHECKUPDATES_DB
- pacdiff: add a "Quit" option, and many other improvements
- pacsysclean is removed
- remove --asroot and enforce fakeroot usage
最近编辑记录 Watermelon.Rei (2022-09-15 13:38:31)
离线
好,已解决此问题,root 不能执行,又不想添加用户,可以通过调用 nobody 用户来执行
把 PKGBUILD 放到其他目录,root 用户的家目录是不能执行的,建议放到 /tmp 去 makepkg,需要安装 fakeroot 包提供伪root环境
su nobody -s /bin/bash -c 'makepkg -s'
离线
为什么不在本地编译好了然后把pkg传到服务器上安装?只是吐个槽(
或者你想反着来?在服务上编译然后把包下载到本地安装
离线
为什么不在本地编译好了然后把pkg传到服务器上安装?只是吐个槽(
或者你想反着来?在服务上编译然后把包下载到本地安装
??? 我完全没想到啊!!:(
离线
页次: 1