帮助修复奇怪的sqlite3错误- dyld:库未加载:/usr/lib/libsqlite3.0.dylib

时间:2021-09-05 05:31:56

I am suddenly getting an sqlite3 error:

我突然得到一个sqlite3错误:

ActionView::Template::Error (dyld: Library not loaded: /usr/lib/libsqlite3.0.dylib
Referenced from: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
Reason: no suitable image found.  Did find:
        /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
        /usr/local/lib/libsqlite3.0.dylib: mach-o, but wrong architecture
        /usr/lib/libsqlite3.0.dylib: mach-o, but wrong architecture

I have no idea why I am suddenly getting this error. Rails 3.1.0 and Ruby 1.9.2 Mac OSX 10.5.8

我不知道为什么我突然得到这个错误。Rails 3.1.0和Ruby 1.9.2 Mac OSX 10.5.8

3 个解决方案

#1


5  

Okay so this is a messed up sqlite3 install and it seems that lots of people run into this problem but solutions are a little hard to come by. After a lot of googling I did the following:

这是一个混乱的sqlite3安装看起来很多人都遇到了这个问题但是解决方案有点难。在搜索了很多次之后,我做了如下的事情:

Step1: went to http://www.sqlite.org/download.html and downloaded sqlite-autoconf-3070800.tar.gz under source code

步骤1:访问http://www.sqlite.org/download.html并下载sqlite-autoconf-3070800.tar。广州下源代码

Step2: expand file and cd into the resultant directory

Step2:将文件和cd扩展到结果目录中。

Step3: sudo CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure --disable-dependency-tracking

Step3: sudo CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure -disabl -依赖性跟踪。

Step4: sudo make install

目的:sudo make install

Step5: added /usr/local/lib to the path

Step5:将/usr/local/lib添加到路径中。

I was doing an awful lot of tinkering during this time. It's possible that I have done something else along the way and not realized and not included it here. But these steps seemed to fix the problem for me.

在这段时间里,我做了大量的修补工作。有可能我在这个过程中做了其他的事情,但没有意识到,也没有把它包括在这里。但这些步骤似乎解决了我的问题。

My environment: Mac OSX 10.5.8 MacBookPro4, Intel Core 2 Duo, 2.5 GHz

我的环境:Mac OSX 10.5.8 MacBookPro4, Intel Core 2 Duo, 2.5 GHz

#2


4  

Thank you so much, in my case I had to rearrange the parameters and I didn't use sudo to configure nor to make:

非常感谢,在我的情况下,我不得不重新安排参数,我没有使用sudo来配置或制作:

make clean

使清洁

./configure --disable-dependency-tracking --prefix=/usr CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64'

./配置——残废依赖性跟踪——前缀=/usr CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64'

make

使

sudo make install

sudo make install

I didn't have to modify the path, I specified in the --prefix="my path"

我不需要修改路径,我在-前缀="my path"中指定

Environment Mac OS X v.10.5.8 2GHz Intel Core 2 Duo

环境Mac OS X v.10.5.8 2GHz Intel Core 2 Duo

#3


2  

Exactly same problem but the solutions here didn't work for me. Instead reinstalling sqlite3 gem fixed the problem for me.

同样的问题,但是这里的解对我不起作用。相反,重新安装sqlite3 gem为我修复了这个问题。

Environment: Mac OS X v. 10.6.8, iMac

环境:Mac OS X v. 10.6.8, iMac

#1


5  

Okay so this is a messed up sqlite3 install and it seems that lots of people run into this problem but solutions are a little hard to come by. After a lot of googling I did the following:

这是一个混乱的sqlite3安装看起来很多人都遇到了这个问题但是解决方案有点难。在搜索了很多次之后,我做了如下的事情:

Step1: went to http://www.sqlite.org/download.html and downloaded sqlite-autoconf-3070800.tar.gz under source code

步骤1:访问http://www.sqlite.org/download.html并下载sqlite-autoconf-3070800.tar。广州下源代码

Step2: expand file and cd into the resultant directory

Step2:将文件和cd扩展到结果目录中。

Step3: sudo CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure --disable-dependency-tracking

Step3: sudo CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure -disabl -依赖性跟踪。

Step4: sudo make install

目的:sudo make install

Step5: added /usr/local/lib to the path

Step5:将/usr/local/lib添加到路径中。

I was doing an awful lot of tinkering during this time. It's possible that I have done something else along the way and not realized and not included it here. But these steps seemed to fix the problem for me.

在这段时间里,我做了大量的修补工作。有可能我在这个过程中做了其他的事情,但没有意识到,也没有把它包括在这里。但这些步骤似乎解决了我的问题。

My environment: Mac OSX 10.5.8 MacBookPro4, Intel Core 2 Duo, 2.5 GHz

我的环境:Mac OSX 10.5.8 MacBookPro4, Intel Core 2 Duo, 2.5 GHz

#2


4  

Thank you so much, in my case I had to rearrange the parameters and I didn't use sudo to configure nor to make:

非常感谢,在我的情况下,我不得不重新安排参数,我没有使用sudo来配置或制作:

make clean

使清洁

./configure --disable-dependency-tracking --prefix=/usr CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64'

./配置——残废依赖性跟踪——前缀=/usr CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64'

make

使

sudo make install

sudo make install

I didn't have to modify the path, I specified in the --prefix="my path"

我不需要修改路径,我在-前缀="my path"中指定

Environment Mac OS X v.10.5.8 2GHz Intel Core 2 Duo

环境Mac OS X v.10.5.8 2GHz Intel Core 2 Duo

#3


2  

Exactly same problem but the solutions here didn't work for me. Instead reinstalling sqlite3 gem fixed the problem for me.

同样的问题,但是这里的解对我不起作用。相反,重新安装sqlite3 gem为我修复了这个问题。

Environment: Mac OS X v. 10.6.8, iMac

环境:Mac OS X v. 10.6.8, iMac