Every time I try to install or uninstall something using Homebrew, I got an error below.
"Error: /usr/local/opt/ruby#2.7 is not a valid keg"
I checked symlink by typing "ls -ld /usr/local/opt /usr/local/opt/ruby#2.7", and got results below.
drwxrwxr-x 183 aiden0206 admin 5856 10 3 20:53 /usr/local/opt
lrwxr-xr-x 1 aiden0206 admin 24 10 3 20:53 /usr/local/opt/ruby#2.7 -> ../Cellar/ruby#2.7/2.7.4
There seems to be no problem. The ruby#2.7 in /usr/local/opt correctly points to the /Cellar directory. Is there any other cause of the problem?
Thank you.
Related
Following the indications found here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-22-04-lts/ I'm trying to install Tile Server in Ubuntu 22.04
but I'm getting this error:
raphy#pc:~$ sudo -u _renderd osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script ./OSM_src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ./OSM_src/openstreetmap-carto/openstreetmap-carto.style ./OSM_src/data/azerbaijan-latest.osm.pbf
osm2pgsql: error while loading shared libraries: libboost_filesystem.so.1.71.0: cannot open shared object file: No such file or directory
The libboost library present is 1.74.0:
raphy#pc:~$ sudo apt install libboost-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libboost-dev is already the newest version (1.74.0.3ubuntu7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
raphy#pc:/usr/lib/x86_64-linux-gnu$ ls -lah | grep libboost_filesystem.so
lrwxrwxrwx 1 root root 29 mar 16 2022 libboost_filesystem.so -> libboost_filesystem.so.1.74.0
-rw-r--r-- 1 root root 123K mar 16 2022 libboost_filesystem.so.1.74.0
Following the indications found here: https://askubuntu.com/questions/950313/how-to-set-ld-library-path-permanently
I've set in .bashrc file:
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/libboost_filesystem.so"
And, following the indications found here: https://serverfault.com/questions/201709/how-to-set-ld-library-path-in-ubuntu
I've set /etc/ld.so.conf.d/libboost.conf as :
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so
And then
sudo ldconfig
But still get the error:
osm2pgsql: error while loading shared libraries: libboost_filesystem.so.1.71.0: cannot open shared object file: No such file or directory
How to solve the problem?
I'm trying to edit a ruby file in my spacemacs editor.
When I open the ruby file I get this debugging information:
[rbenv] Using the currently activated ruby.
evil-line-move: End of buffer
Suspicious state from syntax checker ruby: Flycheck checker ruby returned 1, but its output contained no errors: ruby: /usr/lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /home/sfernandez/.rbenv/versions/2.7.0/lib/libruby.so.2.7)
Try installing a more recent version of ruby, and please open a bug report if the issue persists in the latest release. Thanks!
I've tried the solution from this post:
https://ubuntuforums.org/showthread.php?t=2375927
I tried doing this after changing directory to /usr/lib/x86_64-linux-gnu
sudo mv libcrypt.so.1 libcrypt.so.1.old
After I executed this line I was locked out from doing any commands with sudo. And received an error: sudo: account validation failure, is your account locked. I was able to get sudo access again by just refresh installing my system with Pop!_OS, I guess moving the link for libcrypt.so.1 caused something bad to happen, so won't do that again.
I'm sure this all makes sense, but I feel like I'm missing something and that this shouldn't be hard to fix. Would appreciate any guidance on this.
If it helps here's my system info with neofetch
///////////// sfernandez#pop-os
///////////////////// -----------------
///////*767//////////////// OS: Pop!_OS 20.04 LTS x86_64
//////7676767676*////////////// Host: Inspiron 7559 1.3.1
/////76767//7676767////////////// Kernel: 5.4.0-7634-generic
/////767676///*76767/////////////// Uptime: 9 mins
///////767676///76767.///7676*/////// Packages: 1763 (dpkg), 20 (flatpak)
/////////767676//76767///767676//////// Shell: bash 5.0.16
//////////76767676767////76767///////// Resolution: 1920x1080, 1920x1080
///////////76767676//////7676////////// DE: GNOME
////////////,7676,///////767/////////// WM: Mutter
/////////////*7676///////76//////////// WM Theme: Pop
///////////////7676//////////////////// Theme: Pop [GTK2/3]
///////////////7676///767//////////// Icons: Pop [GTK2/3]
//////////////////////'//////////// Terminal: gnome-terminal
//////.7676767676767676767,////// CPU: Intel i5-6300HQ (4) # 3.200GHz
/////767676767676767676767///// GPU: Intel HD Graphics 530
/////////////////////////// GPU: NVIDIA GeForce GTX 960M
///////////////////// Memory: 2328MiB / 7828MiB
/////////////
After doing some more work on this I've learned a little about symbolic links. I know that libcrypt.so.1 is a symbolic link to libcrypt.so.1.1.0 after running ls -l | grep "libcrypt.so.1" I get the following:
lrwxrwxrwx 1 root root 39 Mar 10 12:24 libcrypt.so -> /lib/x86_64-linux-gnu/libcrypt.so.1.1.0
lrwxrwxrwx 1 root root 17 Mar 10 12:24 libcrypt.so.1 -> libcrypt.so.1.1.0
-rw-r--r-- 1 root root 202760 Mar 10 12:24 libcrypt.so.1.1.0
Running ls -l after changing directory to $HOME/.rbenv/versions/2.7.0/lib I get the following output:
lrwxrwxrwx 1 sfernandez sfernandez 16 Jun 27 20:25 libruby.so -> libruby.so.2.7.0
lrwxrwxrwx 1 sfernandez sfernandez 16 Jun 27 20:25 libruby.so.2.7 -> libruby.so.2.7.0
Now, I think the problem is that libruby.so.2.7 can reference the ruby code just fine, but it also needs access to whatever is referenced by libcrypt.so.1. Anyone got any ideas?
This question is still relevant please help
I have the same issue (pop_os 20.04 LTS, spacemacs 0.300.0#27.1).
The only way I managed to make it work was downgrading emacs to version 26.3.
[UPDATE]
So after about half a year I had to set up a new laptop and was faced with the same problem. After hours of debugging I've finally found my old answer and managed to fix the problem.
Again, the solution for pop_os is to install the app from the pop!_shop that is named Emacs (Terminal).
I am the root and use the command to copy a file to /usr/lib/pkgconfig
cp /usr/local/Cellar/eigen/3.3.4/share/pkgconfig/eigen3.pc .
Password:
cp: ./eigen3.pc: Operation not permitted
I checked the directory, root should have write permission,
drwxr-xr-x 15 root wheel 510 Apr 8 13:29 pkgconfig
How to fix this?
If you are OS X 10.11, this could be due to System Integrity Protection (SIP).
SIP - Wikipedia
Among the protected directories are: /System, /bin, /sbin, /usr (but not /usr/local).
To Disable
StackExchange article to disable SIP
I am trying to do a clean build of Lilypond on a clean install of Mac OS X. Dependencies have been installed using Brew.
I do ./configure && make all in the Lilypond dir. It gets through the configure and starts building but ends on
ERROR: In procedure dynamic-link:
ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found"
I know what libguile is, I don't know if it's on my system (or where it ought to be) but the configure script completes successfully and does not identify it as a missing dependency so I assume it was able to find it.
Any suggestions? Googling shows some old hints with regards to setting $LD_LIBRARY_PATH, but it seems these don't apply to Mac OS 10.6.
There is a port of lilypond available from MacPorts.
$ port info lilypond
lilypond #2.12.3, Revision 3 (textproc)
Variants: [+]docs, gui, universal
Description: Lilypond is a unix-based automated engraving system that generates beautiful sheet music from input files. Lilypond uses its
own input format, .ly, which in many ways is similar to LaTeX. Lilypond can export sheet music to PDF, EPS, SVG, and PNG
formats, and can also create MIDI files.
Homepage: http://lilypond.org/
Library Dependencies: fontforge, ghostscript, mftrace, guile, texinfo, pango, flex, urw-fonts, netpbm
Platforms: darwin
License: unknown
Maintainers: snc#macports.org, openmaintainer#macports.org
It's likely that the dynamic libraries have a .dylib extension, but need a .so extension.
I worked around this by creating links in /opt/local/lib
Owner-Users-MacBook-Pro-15:~ Carl$ ls -l /opt/local/lib | grep .so
-rwxr-xr-x 2 root admin 45152 Mar 11 12:19 libXcursor.1.dylib
-rw-r--r-- 2 root admin 50232 Mar 11 12:19 libXcursor.a
lrwxr-xr-x 1 root admin 18 Mar 11 12:19 libXcursor.dylib -> libXcursor.1.dylib
-rwxr-xr-x 2 root admin 1105 Mar 11 12:19 libXcursor.la
lrwxr-xr-x 1 root admin 32 Mar 11 21:19 libguile-srfi-srfi-1-v-3.so -> libguile-srfi-srfi-1-v-3.3.dylib
lrwxr-xr-x 1 root admin 36 Mar 11 21:19 libguile-srfi-srfi-13-14-v-3.so -> libguile-srfi-srfi-13-14-v-3.3.dylib
lrwxr-xr-x 1 root admin 32 Mar 11 21:20 libguile-srfi-srfi-4-v-3.so -> libguile-srfi-srfi-4-v-3.3.dylib
lrwxr-xr-x 1 root admin 33 Mar 11 21:20 libguile-srfi-srfi-60-v-2.so -> libguile-srfi-srfi-60-v-2.2.dylib
lrwxr-xr-x 1 root admin 17 Mar 11 21:21 libguile.so -> libguile.17.dylib
lrwxr-xr-x 1 root admin 30 Mar 11 21:22 libguilereadline-v-17.so -> libguilereadline-v-17.17.dylib
The easiest way to install Lilypond on macOS is to use lyp. Apart from installing lyp itself, which is a Ruby gem, there's no other dependency to install, no compilation step. Plus, you can install multiple versions of Lilypond and easily switch between them.
$ gem install lyp
$ lyp install lilypond
To install a specific version:
$ lyp install lilypond#2.19.53
I have enabled the Web Server on my Mac OS X (10.5.6) by going to the System Preferences -> Internet & Network -> Sharing and clicking on the Web Server option. It gives me the IP address of my system as the Web Server, but even after clicking on it, it does not show the page, but gives an error: Failed to Connect
Any help on this would be wonderful.
I have tried with MAMP, but there, I am unable to get my own PHP pages to be displayed.
Starting and/or stopping the web server from the command line, gives me the following:
dyld: Symbol not found: _apr_socket_sendfile
Referenced from: /usr/sbin/httpd
Expected in: /usr/lib/libapr-1.0.dylib
Trace/BPT trap
The files on my box are:
~ $ ls -lrt /usr/lib/libapr*
-rwxr-xr-x 1 root wheel 578640 Sep 23 2007 /usr/lib/libapr-1.0.2.7.dylib
-rwxr-xr-x 1 root wheel 393696 Sep 23 2007 /usr/lib/libaprutil-1.0.2.7.dylib
-rwxrwxr-x 1 root admin 569544 Oct 27 10:44 /usr/lib/libaprutil-1.0.2.12.dylib
-rwxrwxr-x 1 root admin 835824 Oct 27 10:44 /usr/lib/libapr-1.0.2.12.dylib
lrwxr-xr-x 1 root admin 25 Jan 4 22:28 /usr/lib/libaprutil-1.dylib -> libaprutil-1.0.2.12.dylib
lrwxr-xr-x 1 root admin 25 Jan 4 22:28 /usr/lib/libaprutil-1.0.dylib -> libaprutil-1.0.2.12.dylib
lrwxr-xr-x 1 root admin 21 Jan 4 22:28 /usr/lib/libapr-1.dylib -> libapr-1.0.2.12.dylib
lrwxr-xr-x 1 root admin 21 Jan 4 22:28 /usr/lib/libapr-1.0.dylib -> libapr-1.0.2.12.dylib
The MD5 values are:
~ $ openssl md5 /usr/sbin/httpd /usr/lib/libapr-1.0.dylib
MD5(/usr/sbin/httpd)= d5194790e9cfaca881d0e8fc3db24889
MD5(/usr/lib/libapr-1.0.dylib)= f7f7fd3cd315ca4e7c6ad2a2f222998e
The libapr-1.0.dylib is linked to the newer 1.0.2.12 version.
I'm having a similar problem and got to this page cause I feel lucky today :)
The error means the httpd binary makes reference to a symbol that cannot be found in the appropriate dynamically linked library (libapr in this case, Apache Runtime Library)
Running same OS X version on an iMac. /usr/lib/libapr-1.0.dylib points to the most recent version of the library (1.0.2.12), which does not define the method/symbol _apr_socket_sendfile
The other version of libapr library is 1.0.2.7, does have that symbol. I had the symbolic links point to this version instead (also for libaprutil):
// BEFORE (both 1.0.2.7 and 1.0.2.12 versions exist, symlinks point to .12)
bash-3.2# ls -l libapr*
-rwxr-xr-x 2 userna wheel 835824 19 Sep 2008 libapr-1.0.2.12.dylib
-rwxr-xr-x 1 root wheel 578640 24 Sep 2007 libapr-1.0.2.7.dylib
lrwxrwxrwx 1 root wheel 21 14 Oct 2008 libapr-1.0.dylib -> libapr-1.0.2.12.dylib
lrwxrwxrwx 1 root wheel 21 14 Oct 2008 libapr-1.dylib -> libapr-1.0.2.12.dylib
-rwxr-xr-x 2 userna wheel 569544 19 Sep 2008 libaprutil-1.0.2.12.dylib
-rwxr-xr-x 1 root wheel 393696 24 Sep 2007 libaprutil-1.0.2.7.dylib
lrwxrwxrwx 1 root wheel 25 14 Oct 2008 libaprutil-1.0.dylib -> libaprutil-1.0.2.12.dylib
lrwxrwxrwx 1 root wheel 25 14 Oct 2008 libaprutil-1.dylib -> libaprutil-1.0.2.12.dylib
// CHANGE symbolic links to previous version
bash-3.2# ln -sf libapr-1.0.2.7.dylib libapr-1.0.dylib
bash-3.2# ln -sf libapr-1.0.2.7.dylib libapr-1.dylib
bash-3.2# ln -sf libaprutil-1.0.2.7.dylib libaprutil-1.0.dylib
bash-3.2# ln -sf libaprutil-1.0.2.7.dylib libaprutil-1.dylib
// TESTing whether httpd is loaded and run
bash-3.2# /usr/sbin/httpd -t
Syntax OK
Not really sure whether this has been broken since last software update that included Apache Web Server, I rarely use it on this box.
Hope it helps ;)
Jon
Maybe there are errors in the apache configuration.
If you disable the webserver in the System preferences and open a terminal you can check your configuration by typing:
httpd -t
If it gives a "Syntax OK" you're one step closer to a working webserver. Start the webserver manually by typing:
sudo httpd
If there are no errors, the webserver is started. Open a browser and check http://localhost. Sometimes an extra refresh (Command+R) is needed.
Stopping the server:
sudo httpd -k stop
If the manually starting works, but the System preferences version doesn't,
Check the /var/log/apache2/error_log for errors.
You can try to do the following:
1. backup current apache
sudo cp /usr/sbin/httpd /usr/sbin/httpd.old
2. Replace link in apache binary file to the old library:
sudo install_name_tool -change /usr/lib/libapr-1.0.dylib /usr/lib/libapr-1.0.2.7.dylib /usr/sbin/httpd
After it should work as expected and other applications will still use the new version of libapr
http://foundationphp.com/tutorials/php_leopard.php
I followed this on mine and it work perfectly.
Try to follow it a see if it works
If you're trying to access the pages from the computer itself just use http://localhost/. Also, try typing the IP address into the browser (instead of just clicking the link in the interface); don't ask me to explain why, but I've seen that make a difference.
Also make sure the OS's firewall is set to allow connections to Apache. "Personal Web Sharing" should be checked.
Have you installed the subversion 1.5 client on your machine? I am seeing the same problem and it seems to be down to this. /usr/lib/libapr-1.0.dylib is normally linked to /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libapr-1.0.2.7.dylib but if you install svn 1.5 it gets re-linked to /opt/subversion/lib/libapr-1.0.2.12.dylib.
The 1.0.2.12 version of the library does not contain the symbol _apr_socket_sendfile.
Having found the problem I'm still trying to figure out how to solve it.
Doug
Stupid question. Does libapr-1.0.dylib exist?
On my Macbook, /usr/lib/libapr-1.0.dylib is a symbolic link to libapr-1.0.2.7.dylib.
Running nm against that file does show that apr_socket_sendfile is defined in that library.
Also: do standard html pages work properly?
It sounds like either:
The httpd that comes first in your path is not /usr/sbin/httpd, and it was built strangely, or
You have installed something that overwrote either httpd or libapr.
What's the MD5 of your httpd and libapr? I get:
$ openssl md5 /usr/sbin/httpd /usr/lib/libapr-1.0.dylib
MD5(/usr/sbin/httpd)= d5194790e9cfaca881d0e8fc3db24889
MD5(/usr/lib/libapr-1.0.dylib)= f1f5ece10140a5c2cea2fece7a9e4918