How to recreate venv with mysql#5.5 with openssl 1.0.0 dependency on mac - mysql

I used to have a venv with mysql#5.5 installed. This somehow broke (I guess because I upgraded my python version) so I'm now trying to recreate it.
However I am getting the following error:
ImportError: dlopen(/Users/bartjonk/Envs/w-poc/lib/python3.9/site-packages/MySQLdb/_mysql.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/opt/mysql#5.5/lib/libmysqlclient.18.dylib Reason: image not found.
I don't know how to fix it.
I can't do a brew switch ore create symlinks as recommended here, since openssl version 1.0.0 is no longer in my cellar:
`> ls -al /usr/local/Cellar/op*
total 0
drwxr-xr-x 3 bartjonk staff 96 2 nov 14:42 .
drwxrwxr-x 106 bartjonk admin 3392 6 nov 17:59 ..
drwxr-xr-x 14 bartjonk staff 448 2 nov 14:42 1.1.1h`
and brew install openssl#1.0.0s or any other variants (brew install openssl#1.0 etc.) only result in :
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "openssl#1.0.2s".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

The link in the comment given by #Reinier Torenbeek (answer to: OpenSSL 1.0.2m on macOS) works like a charm.
I can now switch between the old and the new implementation using:
brew switch openssl 1.0.2m
You can check which versions are available using:
ls -al /usr/local/Cellar/op*

Related

I am trying to install MySQL in fedora

I am trying to install mysql and when I run the install command it keeps throwing the errors or returns failed to download.
[root#fedora rk10]# dnf install mysql-community-server
negativo17 - Nvidia 26 kB/s | 50 kB 00:01
Errors during downloading metadata for repository 'epel-nvidia':
- Status code: 404 for https://negativo17.org/repos/nvidia/epel-36/x86_64/repodata/repomd.xml (IP: 217.79.184.49)
Error: Failed to download metadata for repo 'epel-nvidia': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL 8.0 Community Server 17 B/s | 10 B 00:00
Errors during downloading metadata for repository 'mysql80-community':
- Status code: 404 for http://repo.mysql.com/yum/mysql-8.0-community/fc/36/x86_64/repodata/repomd.xml (IP: 124.41.245.48)
Error: Failed to download metadata for repo 'mysql80-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Connectors Community 16 B/s | 10 B 00:00
Errors during downloading metadata for repository 'mysql-connectors-community':
- Status code: 404 for http://repo.mysql.com/yum/mysql-connectors-community/fc/36/x86_64/repodata/repomd.xml (IP: 124.41.245.48)
Error: Failed to download metadata for repo 'mysql-connectors-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Tools Community 19 B/s | 10 B 00:00
Errors during downloading metadata for repository 'mysql-tools-community':
- Status code: 404 for http://repo.mysql.com/yum/mysql-tools-community/fc/36/x86_64/repodata/repomd.xml (IP: 124.41.245.48)
Error: Failed to download metadata for repo 'mysql-tools-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: epel-nvidia, mysql80-community, mysql-connectors-community, mysql-tools-community
Last metadata expiration check: 0:47:47 ago on Fri Jul 22 17:02:33 2022.
No match for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server
It appears the URLs that your repos are pointed to do not actually exist. Check out the URLS for the first two 'epel-nvidia' and 'mysql80-community':
https://negativo17.org/repos/nvidia/
http://repo.mysql.com/yum/mysql-8.0-community/fc/
I would try modifying your corresponding repo files (/etc/yum.repos.d/(repo filename) for each repo that is failing to include a path that actually exists from each URL.
for instance, in the repo file, try changing:
http://repo.mysql.com/yum/mysql-8.0-community/fc/36/x86_64/repodata/repomd.xml
to
http://repo.mysql.com/yum/mysql-8.0-community/fc/35/x86_64/repodata/repomd.xml
(NOTE the change from ../fc/36/.. to ../fc/35/..)
Good luck, I hope this helps.

unable to install any pkg in Octave

I am new to Octave, coming from Matlab. I am trying to install a few packages, and so far none has worked. I have tried the download method from forge, then running the install command. But my question is about my latest attempt. There it is:
pkg install -global -forge io
csvconcat.cc:79:37: warning: result of comparison of constant 18446744073709551615 with expression of type
'unsigned int' is always true [-Wtautological-constant-out-of-range-compare]
while ((pos=str.find(prot, pos)) != str.npos) {
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
1 warning generated.
error: couldn't append to /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages
save: unable to open output file '/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages'
error: called from
install at line 254 column 7
pkg at line 437 column 9
Couldn't find any documentation on it, I am a bit lost.... (oh and btw, I can't find the config.log file! where is that gem?)
I am on MacOS catalina 10.15.7, and just followed that procedure https://flaviocopes.com/fix-xcrun-error-invalid-active-developer-path/, which solved the issues I had before which is described on that page.
cheers for any help
The error:
error: couldn't append to /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages
save: unable to open output file '/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages'
error: called from
install at line 254 column 7
pkg at line 437 column 9
basically says it's failing to save to that file. Probably a permissions issue. Check if the file /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages exists and its permissions. That file is a database of all packages installed globally, i.e., for all users in the system.
Fixing the permission issues is dependent on what is the permissions issue you have (probably you need to run octave as root to install a global package). But maybe try to install the package for your user only, i.e., install the package without the -global flag, like so:
pkg install -forge io

Fuzzy-logic-toolkit install problem in Octave

I am trying to install the Fuzzy-logic-toolkit package in the Octave 5.1.0 using this comand:
pkg install -forge fuzzy-logic-toolkit -verbose
and tried to sideload also by
pkg install fuzzy-logic-toolkit-0.4.5.tar.gz
but the octave always returns this code:
parse error near line 165 of file /home/leo/octave/fuzzy-logic-toolkit-0.4.5/defuzz.m
anonymous function bodies must be single expressions
>>> y_val = #(y_val) if (y_val == max_y) 1 else 0 endif;
^
error: called from
doc_cache_create>create_cache at line 109 column 20
gen_doc_cache_in_dir>#<anonymous> at line 143 column 16
doc_cache_create>gen_doc_cache_in_dir at line 144 column 9
doc_cache_create at line 55 column 12
install>generate_lookfor_cache at line 794 column 5
install at line 223 column 7
pkg at line 441 column 9
>> warning: load_path: /home/leo/octave/fuzzy-logic-toolkit-0.4.5: Arquivo ou diretório inexistente
warning: load-path: update failed for '/home/leo/octave/fuzzy-logic-toolkit-0.4.5', removing from path
warning: load_path: /home/leo/octave/fuzzy-logic-toolkit-0.4.5: Arquivo ou diretório inexistente
warning: load-path: update failed for '/home/leo/octave/fuzzy-logic-toolkit-0.4.5', removing from path
warning: load_path: /home/leo/octave/fuzzy-logic-toolkit-0.4.5: Arquivo ou diretório inexistente
warning: load-path: update failed for '/home/leo/octave/fuzzy-logic-toolkit-0.4.5', removing from path
Anything I can do to solve this issue? I have the same issue in version 4 (that are installed in the apt install octave of Ubuntu)
The fuzzy logic package has not been update from 2014 so the last one do not build with Octave 5.x
Two possibilities:
1) you take the latest Mercurial code and build from it
hg clone http://hg.code.sf.net/p/octave/fuzzy-logic-toolkit octave-fuzzy-logic-toolkit
cd octave-fuzzy-logic-toolkit/
hg archive ../fuzzy-logic-toolkit-0.4.5.tar.gz -X ".hg*"
cd ..
octave-cli
pkg install fuzzy-logic-toolkit-0.4.5.tar.gz
2) download the mercurial code from other source (eg Cygwin source package) and build from it
wget ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/noarch/release/octave-fuzzy-logic-toolkit/octave-fuzzy-logic-toolkit-0.4.6-0.2-src.tar.xz
tar -xf octave-fuzzy-logic-toolkit-0.4.6-0.2-src.tar.xz
octave-cli
pkg install octave-fuzzy-logic-toolkit-0.4.6-0.2.src/fuzzy-logic-toolkit-hg-0.4.6.tar.bz2

Cannot run CUDA code that queries NVML - error regarding libnvidia-ml.so

Recently a colleague needed to use NVML to query device information, so I downloaded the Tesla development kit 3.304.5 and copied the file nvml.h to /usr/include. To test, I compiled the example code in tdk_3.304.5/nvml/example and it worked fine.
Over a weekend, something changed in the system (I cannot determine what was changed and I am not the only one with access to the machine) and now any code that uses nvml.h, such as the example code, fails with the following error:
Failed to initialize NVML:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING:
You should always run with libnvidia-ml.so that is installed with your NVIDIA Display Driver. By default it's installed in /usr/lib and /usr/lib64. libnvidia-ml.so in TDK package is a stub library that is attached only for build purposes (e.g. machine that you build your application doesn't have to have Display Driver installed).
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
However, I can still run nvidia-smi and read information about my K20m's state, and as far as I am aware nvidia-smi is just a set of calls to nvml.h. The error message I receive is somewhat cryptic, but I believe it is telling me that the nvidia-ml.so file needs to match the Tesla driver that I have installed on my system. Just to ensure everything is correct, I re-downloaded CUDA 5.0 and installed the driver, CUDA runtime, and the test files. I am certain that the nvidia-ml.so file matches the driver (both are 304.54) so I am quite confused as to what could be going wrong. I can compile and run the test code with nvcc as well as run my own CUDA code, as long as it doesn't include nvml.h.
Has anyone encountered this error or have any thoughts on rectifying the issue?
$ ls -la /usr/lib/libnvidia-ml*
lrwxrwxrwx. 1 root root 17 Jul 19 10:08 /usr/lib/libnvidia-ml.so -> libnvidia-ml.so.1
lrwxrwxrwx. 1 root root 22 Jul 19 10:08 /usr/lib/libnvidia-ml.so.1 -> libnvidia-ml.so.304.54
-rwxr-xr-x. 1 root root 391872 Jul 19 10:08 /usr/lib/libnvidia-ml.so.304.54
$ ls -la /usr/lib64/libnvidia-ml*
lrwxrwxrwx. 1 root root 17 Jul 19 10:08 /usr/lib64/libnvidia-ml.so -> libnvidia-ml.so.1
lrwxrwxrwx. 1 root root 22 Jul 19 10:08 /usr/lib64/libnvidia-ml.so.1 -> libnvidia-ml.so.304.54
-rwxr-xr-x. 1 root root 394792 Jul 19 10:08 /usr/lib64/libnvidia-ml.so.304.54
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.54 Sat Sep 29 00:05:49 PDT 2012
GCC version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Fri_Sep_21_17:28:58_PDT_2012
Cuda compilation tools, release 5.0, V0.2.1221
$ whereis nvml.h
nvml: /usr/include/nvml.h
$ ldd example
linux-vdso.so.1 => (0x00007fff2da66000)
libnvidia-ml.so.1 => /usr/lib64/libnvidia-ml.so.1 (0x00007f33ff6db000)
libc.so.6 => /lib64/libc.so.6 (0x000000300e400000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000300ec00000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000300e800000)
/lib64/ld-linux-x86-64.so.2 (0x000000300e000000)
EDIT: The solution was to remove all extra instances of libnvidia-ml.so. For some reason there were a LOT of them.
$ sudo find / -name 'libnvidia-ml*'
/usr/lib/libnvidia-ml.so.304.54
/usr/lib/libnvidia-ml.so
/usr/lib/libnvidia-ml.so.1
/usr/opt/lib/libnvidia-ml.so
/usr/opt/lib/libnvidia-ml.so.1
/usr/opt/lib64/libnvidia-ml.so
/usr/opt/lib64/libnvidia-ml.so.1
/usr/opt/nvml/lib/libnvidia-ml.so
/usr/opt/nvml/lib/libnvidia-ml.so.1
/usr/opt/nvml/lib64/libnvidia-ml.so
/usr/opt/nvml/lib64/libnvidia-ml.so.1
/usr/lib64/libnvidia-ml.so.304.54
/usr/lib64/libnvidia-ml.so
/usr/lib64/libnvidia-ml.so.1
/lib/libnvidia-ml.so.old
/lib/libnvidia-ml.so.1
You are getting this error because the application that is trying to use nvml is loading the stub library that is located in:
...tdk_install_path/lib64/libnvidia-ml.so
instead of the one in:
/usr/lib64/libnvidia-ml.so
I was able to reproduce your error when I added the stub library path to my LD_LIBRARY_PATH environment variable. So that is one possible source of error, if someone added the path of the stub library that comes with the tdk distribution to your LD_LIBRARY_PATH environment variable, but probably not the only way this could happen. If someone in an unusual fashion copied the stub library to some system path, that might also be an issue.
You'll need to try and figure out why your system is loading that stub library in place of the correct one in /usr/lib64. Alternatively, for discovery purposes, you could try deleting all instances of the stub library anywhere on your system (leave the correct libraries in /usr/lib and /usr/lib64 alone), and you should be able to observe correct behavior.
I solved the problem this way on a GTX 1070 using windows 10 : go to device manager, select the GPU that is having a problem, disable the GPU and enable back.
I was having this same or similar issue with EWBF Cuda Miner for zCash.
Here is a way to automatically implement Pro7ech's answer (which worked for me) for WIN10:
Install WDK for Windows 10 if you don't already have it: This will give you the ability to use devcon.exe which allows manipulation of devices via batch scripts:
https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
You might also need the Windows SDK if you don't have visual studio with Desktop development with C++ workload:
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
To make things easier, you might want to add the installation path to your PATH environment variable:
https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
Devcon.exe was installed here for me:
C:\Program Files (x86)\Windows Kits\10\Tools\x64
So now run this or similar in a cmd.exe prompt to get the device id:
devcon findall * | find /i "nvidia"
Here is what mine looks like:
C:\Users\Soenhay>devcon findall * | find /i "nvidia"
HDAUDIO\FUNC_01&VEN_10DE&DEV_0083&SUBSYS_38426674&REV_1001\5&1C277AD4&0&0001: NVIDIA High Definition Audio
SWD\MMDEVAPI\{0.0.0.00000000}.{574980C3-9747-42EF-A78C-4C304E070B81}: SAMSUNG (NVIDIA High Definition Audio)
ROOT\UNNAMED_DEVICE\0000 : NVIDIA Virtual Audio Device (Wave Extensible) (WDM)
PCI\VEN_10DE&DEV_1B81&SUBSYS_66743842&REV_A1\4&1F1337ch33s3&0&0000: NVIDIA GeForce GTX 1070
From that I see that my graphics device id is:
PCI\VEN_10DE&DEV_1B81&SUBSYS_66743842&REV_A1\4&1F1337ch33s3&0&0000
So I create a batch file with the following to disable and re-enable the driver:
devcon disable "#PCI\VEN_10DE&DEV_1B81&SUBSYS_66743842&REV_A1\4&1F1337ch33s3&0&0000"
devcon enable "#PCI\VEN_10DE&DEV_1B81&SUBSYS_66743842&REV_A1\4&1F1337ch33s3&0&0000"
Now, when I get the NVML error when starting the miner I just run this batch file and it fixes it. You could also just add those 2 lines to the beginning of your start.bat file to do this every time but I found that the error does not always happen every time I restart the miner time now.
References:
superuser post
devcon commands
devcon examples
No matching devices found.
NOTE:
The command should have the # symbol at the beginning of the device id.
The batch script should be run as administrator.
I have faced the same error.
Found a solutions is to run command:
nvidia-uninstall

MXMLC Incremental compilation not working

Google shows a couple of hits for this issue, but never a solution that I can find. It's always just a few other people saying "it works for me", and the issue dries up. I've tested both with the "-incremental=true" flag to mxmlc and with the <incremental>true</incremental> tag in my flex config.xml with the same result:
Failed to match the compile target with /export/vampire/build/Editor.swf.cache. The cache file will not be reused.
I get this on each compile after the first that creates the cache, whether the source files were modified or not.
I've checked file permissions (not expecting anything - the cache file and the swf it's checking against were both created by MXMLC to begin with):
-rw-rw-r-- 1 nathan nathan 3181508 2009-07-15 17:50 Editor.swf
-rw-rw-r-- 1 nathan nathan 5756512 2009-07-15 17:50 Editor.swf.cache
$ flex_sdk/bin/mxmlc -version
Version 3.3.0 build 4852
$ uname -a
Linux sargasso 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 2008 i686 GNU/Linux
Ubuntu 8.04
It looks like the "Failed to match compile target" error is being caused by an updated timestamp on the flex config file. Even if the config file is unmodified, mxmlc will throw out the old compile cache and recompile everything as long as the timestamp is newer than that on the cache file. This misleading error message is all the info you get.