emerge --search $MY_PACKAGE is not working well - gentoo

I could search a certain program (ex:htop) by emerge in Gentoo linux.
$ emerge --search sys-process/htop
[ Results for search key : sys-process/htop ]
Searching...
* sys-process/htop
Latest version available: 1.0.2-r1
Latest version installed: [ Not Installed ]
Size of files: 380 KiB
Homepage: http://htop.sourceforge.net
Description: interactive process viewer
License: BSD GPL-2
[ Applications found : 1 ]
But I can't search or install other programs (such as Nvidia driver)
$ emerge --search x11-drivers/nvidia-drivers
[ Results for search key : x11-drivers/nvidia-drivers ]
Searching...
[ Applications found : 0 ]
What is wrong?

If I run the searches i get the following results:
hydra ~ # emerge --search x11-drivers/nvidia-drivers
[ Results for search key : x11-drivers/nvidia-drivers ]
Searching...
* x11-drivers/nvidia-drivers
Latest version available: 455.45.01-r1
Latest version installed: [ Not Installed ]
Size of files: 180.214 KiB
Homepage: https://www.nvidia.com/Download/Find.aspx
Description: NVIDIA Accelerated Graphics Driver
License: GPL-2 NVIDIA-r2
[ Applications found : 1 ]
hydra ~ # emerge --search sys-process/htop
[ Results for search key : sys-process/htop ]
Searching...
* sys-process/htop
Latest version available: 3.0.2
Latest version installed: 3.0.2
Size of files: 173 KiB
Homepage: https://htop.dev/ https://github.com/htop-dev/htop
Description: interactive process viewer
License: BSD GPL-2
[ Applications found : 1 ]
Could you check if your portage tree is up to date? And what architecture are you using? x86_64?
emerge --sync

Related

PlatformIO - STM32 - Library not loaded: /opt/local/lib/libusb-1.0.0.dylib [upload] Error 134

I am trying to program my STM32 via PlatformIO. I am using the built in blink example so I 'know; that my code is not what is causing the issue. I am using macOS - M1 Max - Monterey(12.13.1).
Here is the board I am using: https://ubld.it/products/stm32-midi-dev
The program builds just fine, but when trying to upload, I get the following error:
dyld[54244]: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /Users/***/.platformio/packages/tool-stm32duino/dfu-util/dfu-util
Reason: tried: '/opt/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/lib/libusb-1.0.0.dylib' (no such file)
/Users/***/.platformio/packages/tool-stm32duino/maple_upload: line 53: 54244 Abort trap: 6 ${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} -R ${dfuse_addr} -R
*** [upload] Error 134
My platformio.ini file is as follows:
[env:genericSTM32F103CB]
platform = ststm32
board = genericSTM32F103CB
framework = arduino
board_build.core = maple
upload_protocol = dfu
I have tried the following:
brew install libusb - but it was already installed
brew uninstall libusb - then - brew install libusb
Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError) - This seemed to be more SSL related, but tried anyways
I have read the error message and understand that it appears that a file does not exist, but unsure of what next steps would be as I tried reinstalling libusb above.
Here is my full upload output if helpful:
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103CB.html
PLATFORM: ST STM32 (15.3.0) > STM32F103CB (20k RAM. 128k Flash)
HARDWARE: STM32F103CBT6 72MHz, 20KB RAM, 128KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduinoststm32-maple # 3.10000.201129 (1.0.0)
- tool-dfuutil # 1.9.211020
- tool-openocd # 2.1100.211028 (11.0)
- tool-stm32duino # 1.0.1
- toolchain-gccarmnoneeabi # 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://docs.platformio.org/en/latest/librarymanager/ldf.html
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 30 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio/build/genericSTM32F103CB/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 21.1% (used 4312 bytes from 20480 bytes)
Flash: [= ] 14.3% (used 18712 bytes from 131072 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, dfu, jlink, serial, stlink
CURRENT: upload_protocol = dfu
Looking for upload port...
Auto-detected: /dev/cu.usbmodem1101
Uploading .pio/build/genericSTM32F103CB/firmware.bin
Failed to open serial device.
dyld[54773]: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /Users/***/.platformio/packages/tool-stm32duino/dfu-util/dfu-util
Reason: tried: '/opt/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/lib/libusb-1.0.0.dylib' (no such file)
/Users/***/.platformio/packages/tool-stm32duino/maple_upload: line 53: 54773 Abort trap: 6 ${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} -R ${dfuse_addr} -R
*** [upload] Error 134
Thanks in advance for the help. Pretty new to embedded.
=== EDIT ===
As I continue to research, I think it is related to homebrew not installing in the normal spot for libusb. Homebrew Mac M1 can't find installs
Ok. Thanks to Ivan at PlatformIO, he was able to give me the below resolution. It now works great.
There are no new versions of STM32Duino /dfu-binaries for macOS ARM:
https://github.com/stm32duino/Arduino_Tools/tree/main/macosx/dfu-util
Could I ask you to try the next things?
Edit ~/.platformio/packages/tool-stm32duino/maple_upload
Comment line 43 and add a new one below
DFU_UTIL=~/.platformio/packages/tool-dfuutil/bin/dfu-util

Visual Studio Code terminal shell vs task shell missing rvm

I use RVM to change Ruby versions in my Mac-based development environment.
Inside Visual Studio Code, when I open a regular Terminal tab, I'm dropped into a bash login shell with the -l option, per the standard default configuration, and as documented here:
// VSCode default settings
{
"terminal.integrated.shell.osx": "/bin/bash",
"terminal.integrated.shellArgs.osx": [
"-l"
]
}
The RVM command executed manually from VSCode Terminal gives me the expected ruby version for this project by default.
$ rvm list
ruby-2.0.0-p648 [ x86_64 ]
ruby-2.1.10 [ x86_64 ]
ruby-2.1.5 [ x86_64 ]
ruby-2.2.10 [ x86_64 ]
ruby-2.2.5 [ x86_64 ]
ruby-2.3.0 [ x86_64 ]
* ruby-2.3.1 [ x86_64 ]
=> ruby-2.3.7 [ x86_64 ]
# => - current
# =* - current && default
# * - default
However, when I setup a .vscode/tasks.json file to execute that same command the Ruby version is NOT the correct version, but the default one on the system. Futhermore, I'm unable to actually use rvm use to switch versions (see error message below)
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Check for RVM",
"type": "shell",
"command": "rvm list && rvm use 2.3.7",
"group": {
"kind": "test",
"isDefault": true
}
}
}
}
Output of task execution, with error message about not having a correct login shell.
> Executing task: rvm list && rvm use 2.3.7 <
ruby-2.0.0-p648 [ x86_64 ]
ruby-2.1.10 [ x86_64 ]
ruby-2.1.5 [ x86_64 ]
ruby-2.2.10 [ x86_64 ]
ruby-2.2.5 [ x86_64 ]
ruby-2.3.0 [ x86_64 ]
=* ruby-2.3.1 [ x86_64 ]
ruby-2.3.7 [ x86_64 ]
# => - current
# =* - current && default
# * - default
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
Terminal will be reused by tasks, press any key to close it.
I've even tried specifically adding the -l bash command option as an argument in the Task's configuration, but this does not work.
"options": {
"shell": {
"args": "-l"
}
}
My understanding, after reading through this issue is that the Terminal shell config and the Task shell config is one and the same, so is there some other underlying inconsistency between Terminal shell and Task shell that I'm missing? If not, then what is it about RVM that prevents it from working inside a Task shell?
RVM overrides the 'cd' command to detect the .ruby-version and .ruby-gemset files and automatically set up your environment. A newly initiated vscode terminal doesn't trigger that. It only uses the default or current settings from when vscode was started, NOT what you have defined in your .ruby* files.
So I usually run cd $PWD when starting a new terminal in vscode.
When defining a rake task in tasks.json, my command line is like so:
{
"label": "rake db:migrate",
"type": "shell",
"command": "cd $PWD; rake db:migrate",
"problemMatcher": []
},
Note the cd $PWD prepended to the command line, to hook into rvm.
It's kludgy. But it's working for me so far.
I suspect this non-awareness of rvm/.ruby-gemset/.ruby-version is also preventing vscode's automatic detection of rake tasks that the Ruby plugin is supposed to do, as mentioned here https://medium.com/hack-visual-studio-code/rake-task-auto-detection-in-vscode-ce548488755e. So any rake tasks I want to run via vscode tasks have to be defined manually by me this way.
Hope this helps.
I had similar issue with starting up Rails inside VS Code tasks on MacOS, with zsh as default shell.
Fix was to use --login vs -l. For example:
{
"label": "Rails Sample",
"type": "shell",
"command": "cd rails-sample && bin/rails server",
"options": {
"shell": {
"args": ["--login"]
}
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "rails-sample"
}
}
When I was using -l it would show me error like:
Your Ruby version is 2.6.3, but your Gemfile specified 3.0.2
The terminal process "/bin/zsh '-c', 'cd rails-sample && bin/rails server'" terminated with exit code: 18.
The reason I tried --login was because I came across this issue, even though I have the latest version of VS Code. It could be due to setup on my machine.

No binary rubies available for: osx

I try to install a ruby version via rvm but the installation fails with the following error
> ruby-2.4.5 - #making binaries executable.
> Error running '__rvm_set_executable /Users/username/.rvm/rubies/ruby-2.4.5/bin/*',
please read /Users/username/.rvm/log/1541865833_ruby-2.4.5/chmod.bin.log
before it I read a note that
> No binary rubies available for: osx/10.14/x86_64/ruby-2.4.5.
I googled a lot to find a solution and many posts mentioned that it can be problem with Xcode, but I installed it and the problem is still present
I have MacOS Mojave, version 10.14.1
Log below
current path: /Users/user/.rvm/src/ruby-2.4.5
GEM_HOME=/Users/user/.rvm/gems/ruby-2.4.1
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/user/Library/Python/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/lib/python/site-packages:/Users/user/.rvm/gems/ruby-2.4.1/bin:/Users/user/.rvm/gems/ruby-2.4.1#global/bin:/Users/user/.rvm/rubies/ruby-2.4.1/bin:/Users/user/.nvm/versions/node/v10.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/user/.rvm/bin
GEM_PATH=/Users/user/.rvm/gems/ruby-2.4.1:/Users/user/.rvm/gems/ruby-2.4.1#global
command(2): __rvm_set_executable /Users/user/.rvm/rubies/ruby-2.4.5/bin/*
++ for __file in '"$#"'
++ [[ -x /Users/user/.rvm/rubies/ruby-2.4.5/bin/* ]]
++ chmod +x '/Users/user/.rvm/rubies/ruby-2.4.5/bin/*'
chmod: /Users/user/.rvm/rubies/ruby-2.4.5/bin/*: No such file or directory

AWS EC2 Class 'DOMDocument' not found Laravel

I have search high and low and many hours for this but I really can't find.
I have gone through installing LAMP on the Instance - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html
All solutions ask me to install
yum install php-xml
which I did but still getting the same error. What dependencies am I missing? Help is much much appreciated!
I am using dompdf.
PHP version 7.2.11
I think you are missing -y in the command
# yum list installed | grep php-xml
# yum info php-xml
Available Packages
Name : php-xml
Arch : x86_64
Version : 5.3.3
Release : 40.el6_6
Size : 106 k
Repo : updates
Summary : A module for PHP applications which use XML
URL : http://www.php.net/
License : PHP
Description : The php-xml package contains dynamic shared objects which add support
: to PHP for manipulating XML documents using the DOM tree,
: and performing XSL transformations on XML documents.
# yum install -y php-xml

List of installable Homebrew casks

Is there a way to obtain a list (possibly with descriptions) of all the casks installable with Homebrew Cask?
The new way to list all installable cask packages is:
brew search --casks
The man page for brew has the following information:
search --casks
Display all locally available casks (including tapped ones). No online search is performed.
Update:
While the documentation didn't change, seems like search-text is now mandatory. We can specify * by adding a \* as parameter (to avoid it thinking we are referring to the content of the current directory). So basically it's possible to do:
brew search --casks \*
Brew search now has a --desc flag.
This lists all of them with the description:
brew search --casks --desc ''
List using a browser
Visit the website https://formulae.brew.sh/
Use * as search string and all the casks will be displayed
List using the command line
for cask in $(brew search); do
brew cask info $cask;
done
Run brew search without argument to list all of them. You won’t get descriptions, thought.
The installable list is 7000+ casks. You, of course, can grep the result.., but more practical is to list some subset of the installable casks using search command:
brew search [YOUR-SEARCH-SUBSTRING]
It will print you 2 groups. The first group will be installable ==> Formulae, if any. The second group will be ==> Casks
For example, if you are looking for Beaver DB browser, you can type either:
brew search Beaver
---- Output ----
==> Casks
dbeaver-enterprise dbeaver-enterprise swiftybeaver swiftybeaver
or:
brew search DB
---- Output ----
==> Formulae
ansible-cmdb dbmate lbdb mariadb#10.2 questdb
...
==> Casks
1password-beta dynamodb-local mongodb-compass-readonly
actual-odbc-pack dynamodb-local mongodbpreferencepane
actual-odbc-pack exist-db mongodbpreferencepane
apache-couchdb exist-db navicat-for-mariadb
apache-couchdb flvcd-bigrats navicat-for-mariadb
arq-cloud-backup flvcd-bigrats nosql-workbench-for-amazon-dynamodb
arq-cloud-backup gcollazo-mongodb nosql-workbench-for-amazon-dynamodb
db-browser-for-sqlite gcollazo-mongodb nosqlbooster-for-mongodb
db-browser-for-sqlite handbrake nosqlbooster-for-mongodb
dbeaver-community ✔ handbrake omnidb
dbeaver-community ✔ handbrake-nightly omnidb
dbeaver-enterprise handbrakebatch rekordbox
dbeaver-enterprise handbrakebatch rekordbox
dbglass hex-fiend-beta soundboosterlite
dbglass macgdbp soundboosterlite
dbkoda macgdbp sql-power-architect-jdbc
dbkoda mongodb-compass sql-power-architect-jdbc
dbngin mongodb-compass thingsmacsandboxhelper
dbngin mongodb-compass-beta thingsmacsandboxhelper
dbschema mongodb-compass-community thunderbird-beta
dbschema mongodb-compass-community wireshark-chmodbpf
dbvisualizer mongodb-compass-isolated-edition wireshark-chmodbpf
dbvisualizer mongodb-compass-isolated-edition
deadbeef-devel mongodb-compass-readonly
the ✔ mark indicates installed casks.
Multiple ways to do, collating different answers:
1.
for cask in $(brew search ''); do
brew info $cask; done
brew search --casks
brew search
You could one-line it to put results into file for later (because its really slow querying packages one by one):
for cask in $(brew search ''); do brew info $cask; echo "==="; done > list_of_casks.txt
There's a new GUI that enables quick browsing on all the Homebrew packages.
You might want to try out Cakebrew
Also worth noting the analytics data of the top downloads of all cask packages in the past 365 days: https://formulae.brew.sh/analytics/
Slight modification to the answer above:
for cask in $(brew search --casks); do
brew cask info $cask;
done
If you're not interested in installation stats, which you could get by using brew search answers above, you could simply go with:
grep -e '\(version\|cask\|creator\|desc\|homepage\) ' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/*.rb
This will get you a list lite this:
zotero.rb:cask "zotero" do
zotero.rb: version "5.0.96.3"
zotero.rb: desc "Collect, organize, cite, and share research sources"
zotero.rb: homepage "https://www.zotero.org/"
zprint.rb:cask "zprint" do
zprint.rb: version "1.2.1"
zprint.rb: desc "Library to reformat Clojure and Clojurescript source code and s-expressions"
zprint.rb: homepage "https://github.com/kkinnear/zprint"
zterm.rb:cask "zterm" do
zterm.rb: version "1.2"
zterm.rb: desc "Terminal emulation program"
zterm.rb: homepage "https://www.dalverson.com/zterm/"
which will be instant, rather than waiting for ages for
for cask in $(brew search ''); do brew info $cask; echo "\n\n"; done
where you'd get prettier results and info regarding popularity:
cobalt: stable 0.17.5 (bottled)
Static site generator written in Rust
https://cobalt-org.github.io/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/cobalt.rb
License: MIT
==> Dependencies
Build: rust
==> Analytics
install: 10 (30 days), 45 (90 days), 147 (365 days)
install-on-request: 10 (30 days), 45 (90 days), 147 (365 days)
build-error: 0 (30 days)
coccinelle: stable 1.1.1 (bottled), HEAD
Program matching and transformation engine for C code
http://coccinelle.lip6.fr/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/coccinelle.rb
License: GPL-2.0-only
==> Dependencies
Build: autoconf, automake, hevea, ocaml-findlib, opam, pkg-config
Required: ocaml, pcre
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 3 (30 days), 22 (90 days), 167 (365 days)
install-on-request: 3 (30 days), 22 (90 days), 167 (365 days)
build-error: 0 (30 days)

Resources