Cannot install bmon using opkg under Openwrt? - openwrt

After running opkg install bmon, I got this error:
root#OpenWrt:~# opkg install bmon
Installing bmon (4.0-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/bmon_4.0-1_ar71xx.ipk.
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Installing libncursesw (5.9-3) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libncursesw_5.9-3_ar71xx.ipk.
Configuring iftop.
//usr/lib/opkg/info/iftop.postinst: line 4: default_postinst: not found
Collected errors:
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libform.so
But that file is already provided by package * libncurses
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libmenu.so
But that file is already provided by package * libncurses
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libncurses.so
But that file is already provided by package * libncurses
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libpanel.so
But that file is already provided by package * libncurses
* opkg_install_cmd: Cannot install package bmon.
* pkg_run_script: package "iftop" postinst script returned status 127.
* opkg_configure: iftop.postinst returned 127.
I have searched for quite a while, but there is few info about bmon.
And this is my opkg.conf
root#OpenWrt:~# cat /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz chaos_calmer_base http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base
src/gz chaos_calmer_packages http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages
src/gz chaos_calmer_luci http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/luci
src/gz chaos_calmer_routing http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/routing
src/gz chaos_calmer_telephony http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/telephony
src/gz chaos_calmer_management http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/management

From the logs it seems like bmon has dependency on libncursesw which tries to install some files which were already available from libncurses.
Since both the packages has similar functionalities, you can force the installation by
opkg --nodeps install bmon
This will install the required package but leave the dependencies.

Related

Pipenv uses the wrong lib directory

I have a project using Python 3.10.4, i. e., the Pipfile has,
[requires]
python_version = "3.10.4"
I installed Python 3.10.4 using pyenv install 3.10.4 and now pyenv versions returns,
* system (set by /home/username/.config/pyenv/version)
3.10.4
Now when I run pipenv install I get,
Creating a virtualenv for this project…
Using /home/username/.config/pyenv/versions/3.10.4/bin/python3 (3.10.4) to create virtualenv…
⠋created virtual environment CPython3.10.4.final.0-64 in 82ms
creator CPython3Posix(dest=/home/username/.local/share/virtualenvs/project-2ZeatEXR, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/username/.local/share/virtualenv)
added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Virtualenv location: /home/username/.local/share/virtualenvs/project-2ZeatEXR
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
from . import utils
File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py", line 27, in <module>
from .cookies import RequestsCookieJar, cookiejar_from_dict
File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/cookies.py", line 172, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
The line Using /home/username/.config/pyenv/versions/3.10.4/bin/python3 (3.10.4) indicates that pipenv has found the right Python version and is using it to create the virtual environment but then when creating the lock file, observe that it uses the lib: /usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py directory is of the system installation. Which then causes the error since the system's lib is for Python 3.9.
Maybe this is a bug or maybe I have missed some config. Could someone see what is going wrong here?

Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH. Could you tell me what the problem is?

I'm using npm install -g yo gulp to install yeoman and this is the error I'm getting
npm WARN deprecated cross-spawn-async#2.2.5: cross-spawn no longer requires a build toolchain, use it instead
C:\Usr\local\gulp -> C:\Usr\local\node_modules\gulp\bin\gulp.js
C:\Usr\local\yo -> C:\Usr\local\node_modules\yo\lib\cli.js
C:\Usr\local\yo-complete -> C:\Usr\local\node_modules\yo\lib\completion\index.js
> yo#3.1.0 postinstall C:\Usr\local\node_modules\yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
√ No .bowerrc file in home directory
√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ No .yo-rc.json file in home directory
√ Node.js version
{ Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
at notFoundError (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:8:11)
at verifyENOENT (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:43:16)
at ChildProcess.cp.emit (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:30:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
cmd: 'C:\\WINDOWS\\system32\\cmd.exe /s /c "yo "--version""' }
× yo version
{ Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
at notFoundError (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:8:11)
at verifyENOENT (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:43:16)
at ChildProcess.cp.emit (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:30:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
cmd: 'C:\\WINDOWS\\system32\\cmd.exe /s /c "yo "--version""' }
√ npm version
Found potential issues on your machine :(
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\gulp\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ gulp#4.0.2
+ yo#3.1.0
updated 2 packages in 23.31s
Run the following command to see where npm puts global packages
npm config get prefix
You'll get output similar to this
/usr/local/Cellar/node/10.5.0_1
Copy the output or path and then using any code editor open your .bashrc or .zshrc file depending on the terminal you use and paste like so
export PATH="$PATH:"/usr/local/Cellar/node/10.5.0_1/bin/""
Then after saving run
source ~/.zshrc
Like Xander Cage said.
I have uninstalled node.js -> procedure here
I have restarted my PC.
Then I installed again node.js
It work.
The above didn't work for me at all.
The following solved my problem:
clean installed nodejs and followed steps by dv-here in thread: https://github.com/zkat/npx/issues/100
Note that my npm kept pointing to C:\usr...
I think I set the npm config set prefix= to something mistakenly due to which I was >getting the error. Here's how I fixed it:
Open CMD in "Administrator" mode.
npm cache clear --force
npm install
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache
npm config set prefix C:\Users\myname\AppData\Roaming\npm
I just ran into this issue on MacOS, and saw that all of my global npm binaries were symlinked into the /usr/local/bin directory, except for yo. I created a symlink using this command:
ln -s /usr/local/Cellar/node/12.10.0/bin/yo /usr/local/bin/yo
(Yours may vary)
And yo is now callable.
I had same issue and I really didn't want uninstall nodejs as I have a lot of package installed.
Tried also with the second answer and did not worked.
Then I found this ticked, that is been closed:
https://github.com/yeoman/yeoman/issues/1716
install with yarn command for me worked.
yarn global add yo
Seem then the installation went through with also binary installed.
Nevermind try to install it with npm getting same error, so looking for provide more infos

Can't install libgtk2.0-dev_2.24.31-2_arm64.deb on Renesas R-Car H3 (H3ULCB)

I am trying to run object detection algorithm (which is using OpenCV 2.4.13.7) on H3ULCB. It is giving libGTK as shown below
root#h3ulcb:/media/2.4.13_algo_target_# ./main_
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or [ 1976.641753] audit: type=1706
Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvWaitKey, fil7
terminate called after throwing an instance of 'cv::Exception'
what(): /media/2.4.13.7_pckage/modules/highgui/src/window.cpp:567: error: (-2) The function is not implemented. Rebuild the library with Wiy
Aborted (core dumped)}
To solve the error , I tried to install libGTK package (libgtk2.0-dev_2.24.31-2_arm64.deb) on H3ULCB, but its not getting installed to the target.
* pkg_extract_data_file_names_to_stream: Failed to extract data.tar.gz from package '/media/libgtk2.0-dev_2.24.31-2_arm64.deb'.
* pkg_get_installed_files: Error extracting file list from /media/libgtk2.0-dev_2.24.31-2_arm64.deb.
* opkg_install: Cannot install package libgtk2.0-dev.
BSP and SDK for H3ULCB are build using yocto, details are listed below:
Yocto version: 2.23
Poky: 2.1.3
The same error is resolved on the native Linux (Ubuntu16.04) by installing the libgtk2.0 library from apt-get manager. But package manager apt and dpkg is not getting installed on the target. I tried to add these managers in the yocto layers while building the image.
Currently Available package manager on H3ULCB is OPKG. Since OPKG works on .IPK packages but not .IPK packages on available for libgtk2.0, I have converted the .deb package to a .IPK package .While executing the .IPK package on H3ulcb:
root#h3ulcb:/media# opkg install libgtk2.0-dev_2.24.31-2_arm64.ipk
Collected errors:
* open_outer: Failed to open package 'libgtk2.0-dev_2.24.31-2_arm64.ipk': Unrecognized archive format
* pkg_extract_control_file_to_stream: Failed to extract control.tar.gz from package 'libgtk2.0-dev_2.24.31-2_arm64.ipk'.
* pkg_init_from_file: Failed to extract control file from libgtk2.0-dev_2.24.31-2_arm64.ipk.
In the package libgtk2.0-dev_2.24.31-2_arm64.deb, there are 3 files
control.tar.gz
data.tar.xz
debian-binary
while executing the .deb file on H3ULCB, the error showed data.tar.gz instead of data.tar.xz as given below:
pkg_extract_data_file_names_to_stream: Failed to extract data.tar.gz from package '/media/libgtk2.0-dev_2.24.31-2_arm64.deb'.
I have converted data.tar.xz to data.tar.gz, but how to pack these files 3 files back to .deb package?

Karma not running in Jenkins CI, Cannot find module 'karma-jasmine'

I'm setting up an Angular 4 SPA with automatic testing in Jenkins CI. The SPA is part of a larger, Maven-managed project, so the build is also Maven-managed. So far I've:
Installed the NodeJS plugin on Jenkins, using install from nodejs.org with version 8.6.0
Configured "Global npm packages to install" = "karma-cli phantomjs-prebuilt jasmine-core karma-jasmine karma-phantomjs-launcher karma-junit-reporter karma-coverage"
Added the "maven-karma-plugin" in pom.xml with browsers=PhantomJS / singleRun=true / reporters=dots,junit
Enabled "Provide Node & npm bin/ folder to PATH" on the Jenkins job configuration
The build process starts up quite ok, but eventually I get:
[INFO] --- maven-karma-plugin:1.6:start (default) # webclient ---
[INFO] Executing Karma Test Suite ...
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/karma start /var/lib/jenkins/workspace/funnel_build/webclient/karma.conf.js --browsers PhantomJS --reporters dots,junit --single-run
07 10 2017 17:07:52.801:ERROR [config]: Error in config file!
{ Error: Cannot find module 'karma-jasmine'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at module.exports (/var/lib/jenkins/workspace/funnel_build/webclient/karma.conf.js:9:7)
at Object.parseConfig (/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/karma/lib/config.js:410:5)
The npm install at the very beginning of the build logs:
$ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/npm install -g karma-cli phantomjs-prebuilt jasmine-core karma-jasmine karma-phantomjs-launcher karma-junit-reporter karma-coverage
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/karma -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/karma-cli/bin/karma
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/phantomjs -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/bin/phantomjs
> phantomjs-prebuilt#2.1.15 install /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt
> node install.js
Considering PhantomJS found at /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1507388835905/phantomjs-2.1.1-linux-x86_64 -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm WARN karma-jasmine#1.1.0 requires a peer of karma#* but none was installed.
npm WARN karma-junit-reporter#1.2.0 requires a peer of karma#>=0.9 but none was installed.
npm WARN karma-phantomjs-launcher#1.0.4 requires a peer of karma#>=0.9 but none was installed.
+ karma-phantomjs-launcher#1.0.4
+ karma-coverage#1.1.1
+ karma-jasmine#1.1.0
+ karma-cli#1.0.1
+ karma-junit-reporter#1.2.0
+ jasmine-core#2.8.0
+ phantomjs-prebuilt#2.1.15
updated 7 packages in 10.553s
(The reason the package 'karma' is currently not on the list is that I read somewhere that karma-cli should be used in place of karma. Adding the 'karma' package doesn't change anything, however.)
Any idea why that "Cannot find module 'karma-jasmine'" pops up? In (2) you'll see that the karma-jasmine package is listed, I find it on the server, but still it's not found by the NodeJS plugin.
Thanks, Simon
I managed to get it to work by running "npm install" as part of the build process, and then run everything on local npm packages.
The entire setup is described here: https://funneltravel.wordpress.com/2017/10/16/running-karma-with-maven-on-jenkins-ci/

Failed to install rabbitmq-server on Linux(Oracle Linux Server release 6.7/RHEL)

I am getting following error while installing.
$ sudo yum install rabbitmq-server
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Loading support for kernel ABI
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: archive.linux.duke.edu
* ol6_UEKR3: slcac475.us.oracle.com
* ol6_latest: slcac475.us.oracle.com
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.1.5-1.el6 will be installed
--> Finished Dependency Resolution`
...
...
...
groupadd: Can't get unique system GID (no more available GIDs)
useradd: group 'rabbitmq' does not exist
error: %pre(rabbitmq-server-3.1.5-1.el6.noarch) scriptlet failed, exit status 6
Error in PREIN scriptlet in rpm package rabbitmq-server-3.1.5-1.el6.noarch
error: install: %pre scriptlet failed (2), skipping rabbitmq-server-3.1.5-1.el6
Verifying :
rabbitmq-server-3.1.5-1.el6.noarch
Failed
rabbitmq-server.noarch 0:3.1.5-1.el6
Complete!
Note: I have already installed the erlang
I have refereed few posts already there
Installing rabbitmq-server on RHEL
RabbitMQ install issue on Centos 5.5
Go to /etc/login.defs and check if you have something like this, if not add it into it.
SYS_GID_MIN 2000
SYS_GID_MAX 9000

Resources