How to get "/usr/bin/cpupower" in RHEL7 ?

博客围绕Red Hat Enterprise Linux 7.0系统展开,提出在RHEL7中安装特定包及运行命令报错的问题,指出该特定包由某个包提供,建议安装此包以解决在RHEL7中运行命令的问题。

https://access.redhat.com/solutions/1213953

 SOLUTION UNVERIFIED - 已更新 2014年九月29日14:19 - 

English 

环境

  • Red Hat Enterprise Linux 7.0

问题

  • How to install cpupowerutils package in RHEL7 ?
  • When trying to run cpupower command, getting following error :

Raw

# cpupower frequency-set -f 3100
bash: cpupower: command not found...
  • Which package provides cpupowerutils package in RHEL7 ?

决议

  • /usr/bin/cpupower is provided by kernel-tools.x86_64 package in RHEL7.
  • So install this package to get /usr/bin/cpupower command in RHEL7:
# yum install kernel-tools.x86_64

转帖者注:查看kernel-tools.x86_64包括哪些命令:

[root@dbserver tmp]# rpm -ql kernel-tools.x86_64 
/etc/sysconfig/cpupower
/usr/bin/centrino-decode
/usr/bin/cpupower
/usr/bin/powernow-k8-decode
/usr/bin/tmon
/usr/bin/turbostat
/usr/bin/x86_energy_perf_policy
/usr/lib/systemd/system/cpupower.service
/usr/share/locale/cs/LC_MESSAGES/cpupower.mo
/usr/share/locale/de/LC_MESSAGES/cpupower.mo
/usr/share/locale/fr/LC_MESSAGES/cpupower.mo
/usr/share/locale/it/LC_MESSAGES/cpupower.mo
/usr/share/locale/pt/LC_MESSAGES/cpupower.mo
/usr/share/man/man1/cpupower-frequency-info.1.gz
/usr/share/man/man1/cpupower-frequency-set.1.gz
/usr/share/man/man1/cpupower-idle-info.1.gz
/usr/share/man/man1/cpupower-idle-set.1.gz
/usr/share/man/man1/cpupower-info.1.gz
/usr/share/man/man1/cpupower-monitor.1.gz
/usr/share/man/man1/cpupower-set.1.gz
/usr/share/man/man1/cpupower.1.gz
/usr/share/man/man8/turbostat.8.gz
/usr/share/man/man8/x86_energy_perf_policy.8.gz
[root@dbserver tmp]# 

 

root@740:~# uname -r Command 'uname' not found, but can be installed with: apt install coreutils root@740:~# apt install ^C root@740:~# uname Command 'uname' not found, but can be installed with: apt install coreutils root@740:~# apt install coreutils Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be upgraded: coreutils 1 upgraded, 0 newly installed, 0 to remove and 291 not upgraded. 1 not fully installed or removed. Need to get 0 B/1,437 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 126802 files and directories currently installed.) Preparing to unpack .../coreutils_8.32-4.1ubuntu1.2_amd64.deb ... Unpacking coreutils (8.32-4.1ubuntu1.2) over (8.32-4.1ubuntu1) ... Access denied: rename blocked for /usr/bin/logname.dpkg-new -> /usr/bin/logname dpkg: error processing archive /var/cache/apt/archives/coreutils_8.32-4.1ubuntu1.2_amd64.deb (--unpack): unable to install new version of '/usr/bin/logname': Permission denied Access denied: rename blocked for /usr/share/man/man1/logname.1.gz.dpkg-tmp -> /usr/share/man/man1/logname.1.gz dpkg: error while cleaning up: unable to restore backup version of '/usr/share/man/man1/logname.1.gz': Permission denied Access denied: rename blocked for /usr/share/doc/coreutils/changelog.Debian.gz.dpkg-tmp -> /usr/share/doc/coreutils/changelog.Debian.gz dpkg: error while cleaning up: unable to restore backup version of '/usr/share/doc/coreutils/changelog.Debian.gz': Permission denied Access denied: rename blocked for /usr/bin/logname.dpkg-tmp -> /usr/bin/logname dpkg: error while cleaning up: unable to restore backup version of '/usr/bin/logname': Permission denied Errors were encountered while processing: /var/cache/apt/archives/coreutils_8.32-4.1ubuntu1.2_amd64.deb needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)
09-29
(base) lenovo@lenovo-V2:/mnt/65f6468a-2da7-47c8-bbfa-e1bbde34b290/R-4.5.0$ ./configure checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu loading site script './config.site' loading build-specific script './config.site' checking for pwd... /usr/bin/pwd checking whether builddir is srcdir... yes checking whether ln -s works... yes checking for ar... ar checking for a BSD-compatible install... /usr/bin/install -c checking for sed... /usr/bin/sed checking for which... /usr/bin/which checking for less... /usr/bin/less checking for gtar... no checking for gnutar... no checking for tar... /usr/bin/tar checking for tex... /usr/bin/tex checking for pdftex... /usr/bin/pdftex checking for pdflatex... /usr/bin/pdflatex checking for makeindex... /usr/bin/makeindex checking for texi2any... /usr/bin/texi2any checking whether texi2any version is at least 6.1... yes checking for ginstall-info... /usr/bin/ginstall-info checking for texi2dvi... /usr/bin/texi2dvi checking for kpsewhich... /usr/bin/kpsewhich checking for latex inconsolata package... missing configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF vignettes and package manuals will not be rendered optimally checking for unzip... /usr/bin/unzip checking for zip... /usr/bin/zip checking for gzip... /usr/bin/gzip checking for bzip2... /home/lenovo/miniconda3/bin/bzip2 checking for xdg-open... /usr/bin/xdg-open using default browser ... /usr/bin/xdg-open checking for xdg-open... /usr/bin/xdg-open checking for working aclocal... missing checking for working autoconf... missing checking for working autoheader... missing checking for bison... no checking for byacc... no checking for yacc... no checking for notangle... false checking for realpath... /usr/bin/realpath checking for pkg-config... /usr/bin/pkg-config checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking for sys/time.h... yes checking for sys/param.h... yes checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking whether gcc -std=gnu23 is a C23 compiler... no checking whether gcc -std=gnu2x is a C23 compiler... no configure: WARNING: C23 support is unavailable checking how to run the C preprocessor... gcc -E looking for a modern Fortran compiler checking for gfortran... no checking for g95... no checking for xlf95... no checking for f95... no checking for fort... no checking for ifort... no checking for ifc... no checking for efc... no checking for pgfortran... no checking for pgf95... no checking for lf95... no checking for ftn... no checking for nagfor... no checking for xlf90... no checking for f90... no checking for pgf90... no checking for pghpf... no checking for epcf90... no checking for g77... no checking for xlf... no checking for f77... no checking for frt... no checking for pgf77... no checking for cf77... no checking for fort77... no checking for fl32... no checking for af77... no checking whether the compiler supports GNU Fortran... no checking whether accepts -g... no configure: error: No Fortran compiler found
11-12
继续安装之后,再次执行pnpm i 出现新问题node_modules/.pnpm/jpegtran-bin@5.0.2/node_modules/jpegtran-bin: Running postinstall script, failed in 25.3s .../node_modules/jpegtran-bin postinstall$ node lib/install.js │ ⚠ getaddrinfo ENOTFOUND cdn.npmmirror.com │ ⚠ jpegtran pre-build test failed │ ℹ compiling from source │ ✖ Error: Command failed: /bin/sh -c ./configure --disable-shared --prefix="/home/jenkins/pms-web/node_modules/.pnpm/jpegtran-bin@5.0.2/node_modules/jpegtran-bin/vendor" --bindir="/home/jenkins/pms-web/node_modules/.pnpm/jp… │ configure: error: no nasm (Netwide Assembler) found │ checking for a BSD-compatible install... /usr/bin/install -c │ checking whether build environment is sane... yes │ checking for a thread-safe mkdir -p... /usr/bin/mkdir -p │ checking for gawk... gawk │ checking whether make sets $(MAKE)... yes │ checking whether make supports nested variables... yes │ checking whether make supports nested variables... (cached) yes │ checking for style of include used by make... GNU │ checking for gcc... gcc │ checking whether the C compiler works... yes │ checking for C compiler default output file name... a.out │ checking for suffix of executables... │ checking whether we are cross compiling... no │ checking for suffix of object files... o │ checking whether we are using the GNU C compiler... yes │ checking whether gcc accepts -g... yes │ checking for gcc option to accept ISO C89... none needed │ checking whether gcc understands -c and -o together... yes │ checking dependency style of gcc... gcc3 │ checking how to run the C preprocessor... gcc -E │ checking for gcc... (cached) gcc │ checking whether we are using the GNU C compiler... (cached) yes │ checking whether gcc accepts -g... (cached) yes │ checking for gcc option to accept ISO C89... (cached) none needed │ checking whether gcc understands -c and -o together... (cached) yes │ checking dependency style of gcc... (cached) gcc3 │ checking for ar... ar │ checking the archiver (ar) interface... ar │ checking dependency style of gcc... gcc3 │ checking build system type... x86_64-unknown-linux-gnu │ checking host system type... x86_64-unknown-linux-gnu │ checking how to print strings... printf │ checking for a sed that does not truncate output... /usr/bin/sed │ checking for grep that handles long lines and -e... /usr/bin/grep │ checking for egrep... /usr/bin/grep -E │ checking for fgrep... /usr/bin/grep -F │ checking for ld used by gcc... /usr/bin/ld │ checking if the linker (/usr/bin/ld) is GNU ld... yes │ checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B │ checking the name lister (/usr/bin/nm -B) interface... BSD nm │ checking whether ln -s works... yes │ checking the maximum length of command line arguments... 1572864 │ checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop │ checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop │ checking for /usr/bin/ld option to reload object files... -r │ checking for objdump... objdump │ checking how to recognize dependent libraries... pass_all │ checking for dlltool... no │ checking how to associate runtime and link libraries... printf %s\n │ checking for archiver @FILE support... @ │ checking for strip... strip │ checking for ranlib... ranlib │ checking command to parse /usr/bin/nm -B output from gcc object... ok │ checking for sysroot... no │ checking for a working dd... /usr/bin/dd │ checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 │ checking for mt... no │ checking if : is a manifest tool... no │ checking for ANSI C header files... yes │ checking for sys/types.h... yes │ checking for sys/stat.h... yes │ checking for stdlib.h... yes │ checking for string.h... yes │ checking for memory.h... yes │ checking for strings.h... yes │ checking for inttypes.h... yes │ checking for stdint.h... yes │ checking for unistd.h... yes │ checking for dlfcn.h... yes │ checking for objdir... .libs │ checking if gcc supports -fno-rtti -fno-exceptions... no │ checking for gcc option to produce PIC... -fPIC -DPIC │ checking if gcc PIC flag -fPIC -DPIC works... yes │ checking if gcc static flag -static works... no │ checking if gcc supports -c -o file.o... yes │ checking if gcc supports -c -o file.o... (cached) yes │ checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes │ checking dynamic linker characteristics... GNU/Linux ld.so │ checking how to hardcode library paths into programs... immediate │ checking whether stripping libraries is possible... yes │ checking if libtool supports shared libraries... yes │ checking whether to build shared libraries... no │ checking whether to build static libraries... yes │ checking whether ln -s works... yes │ checking for pkg-config... /usr/bin/pkg-config │ checking pkg-config is at least version 0.9.0... yes │ checking size of size_t... 8 │ checking whether compiler supports pointers to undefined structures... yes │ checking whether __SUNPRO_C is declared... no │ checking for ANSI C header files... (cached) yes │ checking stddef.h usability... yes │ checking stddef.h presence... yes │ checking for stddef.h... yes │ checking for stdlib.h... (cached) yes │ checking locale.h usability... yes │ checking locale.h presence... yes │ checking for locale.h... yes │ checking for string.h... (cached) yes │ checking for sys/types.h... (cached) yes │ checking for an ANSI C-conforming const... yes │ checking whether char is unsigned... no │ checking for inline... inline │ checking for size_t... yes │ checking for unsigned char... yes │ checking for unsigned short... yes │ checking if right shift is signed... yes │ checking for memset... yes │ checking for memcpy... yes │ checking libjpeg API version... 6.2 │ checking whether to include in-memory source/destination managers... yes │ checking libjpeg shared library version... 62.2.0 │ checking whether the linker supports version scripts... yes (GNU style) │ checking whether to use version script when building libjpeg-turbo... yes │ checking for inline... inline __attribute__((always_inline)) │ checking whether to include arithmetic encoding support... yes │ checking whether to include arithmetic decoding support... yes │ checking whether to use 12-bit samples... no │ checking whether to build TurboJPEG C wrapper... yes │ checking whether to build TurboJPEG Java wrapper... no │ checking if we have SIMD optimisations for cpu type... yes (x86_64) │ checking for nasm... no │ checking for nasmw... no │ checking for yasm... no │ at /home/jenkins/pms-web/node_modules/.pnpm/execa@0.7.0/node_modules/execa/index.js:231:11 │ at process.processTicksAndRejections (node:internal/process/task_queues:95:5) │ at async Promise.all (index 0) └─ Failed in 25.3s at /home/jenkins/pms-web/node_modules/.pnpm/jpegtran-bin@5.0.2/node_modules/jpegtran-bin 这个怎么解决
最新发布
12-10
$ ./configure --enable-openssl checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... yes checking build system type... x86_64-pc-cygwin checking host system type... x86_64-pc-cygwin checking target system type... x86_64-pc-cygwin checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib/php/20180731 checking for PHP installed headers prefix... /usr/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking enable debug log... no checking enable trace log... no checking enable sockets support... no checking enable openssl support... yes checking swoole support... yes, shared checking enable mysqlnd support... no checking enable c-ares support... no checking enable io-uring support... no checking dir of openssl... no checking enable brotli support... auto checking dir of brotli... no checking enable zstd support... no checking dir of nghttp2... no checking enable asan... no checking whether to enable swoole coverage support... no checking whether to enable Swoole developer build flags... no checking whether to enable Swoole CURL build flags... no checking whether to enable postgresql build flags... no checking whether to enable thread context... no checking whether to enable swoole thread support... no checking whether to enable swoole stdext support... no checking whether to enable coroutine execution time ... no checking "for ODBC v3 support for PDO"... no checking if compiling with clang... no checking for cc option to accept ISO C99... none needed ./configure: line 7259: syntax error near unexpected token `CURL,' ./configure: line 7259: ` PKG_CHECK_MODULES(CURL, libcurl >= 7.56.0)'
10-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值