i installed *ruby2.1-rubygem-qtbindings package from repo devel_languages_ruby_extensions, and kdebindings-smokegen *package comes from repo *openSUSE-13.2-Update, but these two packages conflicts *with file /usr/bin/smokeapi. i didn’t find any other repos providing these two packages so i had to just ignore the error information , say ‘yes’ to it and then the installation process continued.
> sudo zypper --no-refresh in ruby2.1-rubygem-qtbindings
Loading repository data…
Reading installed packages…
Resolving package dependencies…
The following 5 NEW packages are going to be installed:
kdebindings-smokegen libqwt5 libsmokegen-devel libsmokeqt ruby2.1-rubygem-qtbindings
5 new packages to install.
Overall download size: 5.5 MiB. Already cached: 0 B After the operation, additional 25.2 MiB will be used.
Continue? [y/n/? shows all options] (y):
Retrieving package libqwt5-5.2.3-4.21.x86_64 (1/5), 254.6 KiB (853.2 KiB unpacked)
Retrieving: libqwt5-5.2.3-4.21.x86_64.rpm …[done (70.9 KiB/s)]
Retrieving package kdebindings-smokegen-4.14.3-4.2.x86_64 (2/5), 232.5 KiB (668.2 KiB unpacked)
Retrieving: kdebindings-smokegen-4.14.3-4.2.x86_64.rpm …[done]
Retrieving package libsmokegen-devel-4.14.3-4.2.x86_64 (3/5), 156.5 KiB (456.2 KiB unpacked)
Retrieving: libsmokegen-devel-4.14.3-4.2.x86_64.rpm …[done]
Retrieving package libsmokeqt-4.14.3-4.5.x86_64 (4/5), 2.8 MiB ( 15.7 MiB unpacked)
Retrieving: libsmokeqt-4.14.3-4.5.x86_64.rpm …[done (1.3 MiB/s)]
Retrieving package ruby2.1-rubygem-qtbindings-4.8.6.2-1.3.x86_64 (5/5), 2.1 MiB ( 7.6 MiB unpacked)
Retrieving: ruby2.1-rubygem-qtbindings-4.8.6.2-1.3.x86_64.rpm …[done (77.1 KiB/s)]
Checking for file conflicts: …[error]
Detected 1 file conflict:
File /usr/bin/smokeapi
from install of
kdebindings-smokegen-4.14.3-4.2.x86_64(openSUSE-13.2-Update)
conflicts with file from install of
ruby2.1-rubygem-qtbindings-4.8.6.2-1.3.x86_64(Ruby Extensions (openSUSE_13.2))
File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
Continue? [yes/no] (no): yes
(1/5) Installing: libqwt5-5.2.3-4.21 …[done]
(2/5) Installing: kdebindings-smokegen-4.14.3-4.2 …[done]
(3/5) Installing: libsmokegen-devel-4.14.3-4.2 …[done]
(4/5) Installing: libsmokeqt-4.14.3-4.5 …[done]
(5/5) Installing: ruby2.1-rubygem-qtbindings-4.8.6.2-1.3 …[done]
Additional rpm output:
update-alternatives: using /usr/bin/smokeapi.ruby2.1-4.8.6.2 to provide /usr/bin/smokeapi (smokeapi) in auto mode
update-alternatives: using /usr/bin/smokeapi.ruby2.1-4.8.6.2 to provide /usr/bin/smokeapi-4.8.6.2 (smokeapi-4.8.6.2) in auto mode
update-alternatives: using /usr/bin/smokeapi.ruby2.1-4.8.6.2 to provide /usr/bin/smokeapi.ruby2.1 (smokeapi.ruby2.1) in auto mode
update-alternatives: using /usr/bin/smokedeptool.ruby2.1-4.8.6.2 to provide /usr/bin/smokedeptool (smokedeptool) in auto mode
update-alternatives: using /usr/bin/smokedeptool.ruby2.1-4.8.6.2 to provide /usr/bin/smokedeptool-4.8.6.2 (smokedeptool-4.8.6.2) in auto mode
update-alternatives: using /usr/bin/smokedeptool.ruby2.1-4.8.6.2 to provide /usr/bin/smokedeptool.ruby2.1 (smokedeptool.ruby2.1) in auto mode
update-alternatives: using /usr/bin/rbrcc.ruby2.1-4.8.6.2 to provide /usr/bin/rbrcc (rbrcc) in auto mode
update-alternatives: using /usr/bin/rbrcc.ruby2.1-4.8.6.2 to provide /usr/bin/rbrcc-4.8.6.2 (rbrcc-4.8.6.2) in auto mode
update-alternatives: using /usr/bin/rbrcc.ruby2.1-4.8.6.2 to provide /usr/bin/rbrcc.ruby2.1 (rbrcc.ruby2.1) in auto mode
update-alternatives: using /usr/bin/rbuic4.ruby2.1-4.8.6.2 to provide /usr/bin/rbuic4 (rbuic4) in auto mode
update-alternatives: using /usr/bin/rbuic4.ruby2.1-4.8.6.2 to provide /usr/bin/rbuic4-4.8.6.2 (rbuic4-4.8.6.2) in auto mode
update-alternatives: using /usr/bin/rbuic4.ruby2.1-4.8.6.2 to provide /usr/bin/rbuic4.ruby2.1 (rbuic4.ruby2.1) in auto mode
update-alternatives: using /usr/bin/rbqtapi.ruby2.1-4.8.6.2 to provide /usr/bin/rbqtapi (rbqtapi) in auto mode
update-alternatives: using /usr/bin/rbqtapi.ruby2.1-4.8.6.2 to provide /usr/bin/rbqtapi-4.8.6.2 (rbqtapi-4.8.6.2) in auto mode
update-alternatives: using /usr/bin/rbqtapi.ruby2.1-4.8.6.2 to provide /usr/bin/rbqtapi.ruby2.1 (rbqtapi.ruby2.1) in auto mode
then i wrote a little qt4ruby program ,but failed to run.
require 'Qt4'
class MyWidget < Qt::Widget
def initialize(parent=nil)
super(parent)
end
end
app = Qt::Application.new(ARGV)
widget = MyWidget.new
widget.show
app.exec
error informations follows:
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/bruce/RubymineProjects/RubyStudy/qt4ruby.rb
/usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': libqtruby4shared.so.2: cannot open shared object file: No such file or directory - /usr/lib64/ruby/gems/2.1.0/gems/qtbindings-4.8.6.2/lib/2.1/qtruby4.so (LoadError)
from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib64/ruby/gems/2.1.0/gems/qtbindings-4.8.6.2/lib/Qt4.rb:17:in `<top (required)>'
from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /home/bruce/RubymineProjects/RubyStudy/qt4ruby.rb:1:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
i also tried to run */usr/bin/smokeapi *and got a similar error.
/usr/bin/smokeapi
/usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire': libqtruby4shared.so.2: cannot open shared object file: No such file or directory - /usr/lib64/ruby/gems/2.1.0/gems/qtbindings-4.8.6.2/lib/2.1/qtruby4.so (LoadError) from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
require’
from /usr/lib64/ruby/gems/2.1.0/gems/qtbindings-4.8.6.2/lib/Qt4.rb:17:in<top (required)>' from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
require’
from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/lib64/ruby/gems/2.1.0/gems/qtbindings-4.8.6.2/lib/Qt.rb:1:in
<top (required)>’
from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
require’
from /usr/lib64/ruby/gems/2.1.0/gems/qtbindings-4.8.6.2/bin/smokeapi:4:in<top (required)>' from /usr/bin/smokeapi:23:in
load’
from /usr/bin/smokeapi:23:in `<main>’
please help me out, thanks in advance!