帮助修复奇怪的 sqlite3 错误 - dyld: Library not returned: /usr/lib/libsqlite3.0.dylib
我突然收到 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
我不知道为什么突然收到此错误。 Rails 3.1.0 和 Ruby 1.9.2 Mac OSX 10.5.8
I am suddenly getting an sqlite3 error:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好吧,这是一个混乱的 sqlite3 安装,似乎很多人都遇到了这个问题,但解决方案有点难以找到。经过大量谷歌搜索后,我执行了以下操作:
第 1 步:转到 http://www.sqlite.org/download .html 并下载源代码下的sqlite-autoconf-3070800.tar.gz
步骤2:展开文件并cd到结果目录中
步骤3:sudo CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure --disable-dependency-tracking
第 4 步: sudo make install
第 5 步:将 /usr/local/lib 添加到路径中
我在这段时间做了很多修改。有可能我一路上做了其他事情但没有意识到并且没有将其包含在这里。但这些步骤似乎解决了我的问题。
我的环境:Mac OSX 10.5.8 MacBookPro4,Intel Core 2 Duo,2.5 GHz
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:
Step1: went to http://www.sqlite.org/download.html and downloaded sqlite-autoconf-3070800.tar.gz under source code
Step2: expand file and cd into the resultant directory
Step3: sudo CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure --disable-dependency-tracking
Step4: sudo make install
Step5: added /usr/local/lib to the path
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
非常感谢,就我而言,我必须重新排列参数,并且没有使用 sudo 来配置或制作:
make clean
./configure --disable-dependency-tracking --prefix=/usr CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64'
make
sudo make install
我不必修改路径,我在--prefix="我的路径"
环境 Mac OS X v.10.5.8 2GHz Intel Core 2 Duo
Thank you so much, in my case I had to rearrange the parameters and I didn't use sudo to configure nor to make:
make clean
./configure --disable-dependency-tracking --prefix=/usr CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64'
make
sudo make install
I didn't have to modify the path, I specified in the --prefix="my path"
Environment Mac OS X v.10.5.8 2GHz Intel Core 2 Duo
完全相同的问题,但这里的解决方案对我不起作用。
相反,重新安装 sqlite3 gem 解决了我的问题。
环境:Mac OS X v.10.6.8、iMac
Exactly same problem but the solutions here didn't work for me.
Instead reinstalling sqlite3 gem fixed the problem for me.
Environment: Mac OS X v. 10.6.8, iMac