Why fedora can't load module-detect? - fedora

I have installed fedora yesterday. I was using arch all my linux-life, fedora is good too. But I have only one problem. For using my headpanel analog sound i run script with pulseaudio module setup:
pactl load-module module-detect
But it doesn't work on Fedora. I have an error every time:
Failure: Module initialization failed
What i need to do?

Related

How to fix Kotlin REPL exception NoClassDefFoundError

I'm attempting to run the Kotlin REPL on my windows 10 machine, from the command line. I am receiving a java.lang.NoClassDefFoundError: org/jline/reader/LineReaderBuilder exception when running the command kotlinc
I have IntelliJ Ultimate 2019.1.3 installed, with the Kotlin plugin. I have the Kotlin standalone compiler also installed and I've added that location to my system path. I've tried to run the command from the standalone directory: "C:/Tools/kotlinc/bin" but no difference.
OS Name: Microsoft Windows 10 Enterprise
Version 10.0.16299 Build 16299
Kotlin version 1.3.40-release-123 (JRE 1.8.0_131-b11)
java version "1.8.0_131"
I expect the REPL to start without an exception. What could be causing the exception?
Thank you all!
It looks like that was a bug and it has been fixed with Kotlin plugin & kotlinc version 1.3.41 (released today).

openCV doesn't play video on Fedora 28

I have just started learn opencv and i encountered a problem about playing video. I use qt-creator for opencv and my os is fedora 28.
My code:
cv::VideoCapture vCap;
vCap.open("/home/enes/sample.mp4");
if(vCap.isOpened()){
cv::Mat frame;
cv::namedWindow("Video");
for(;;){
if(!vCap.read(frame)) break;
cv::imshow("Video", frame);
}
}
My problem is below.
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device /home/enes/sample.mp4: Unable to query number of channels
OpenCV(3.4.1) Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp, line 1869
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
OpenCV(3.4.1) /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:1869: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
in function handlemessage
CvCapture_OpenNI::CvCapture_OpenNI : Failed to open input file (/home/enes/sample.mp4): Bad file extension
What should I do to solve this problem? Thanks.
I managed to play MP4 video with OpenCV on Fedora 28 by building the opencv module from source, as described here: Install OpenCV-Python in Fedora.
I also installed most of the gstreamer-plugins-* packages and uninstalled the managed OpenCV packages before compiling Open CV.

JSON/RPC/Client.pm Missing - Fedora 17

I want to run a JSON request using Zabbix API, but I get the following error:
Can't locate JSON/RPC/Client.pm in #INC (#INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5 .) at ./test.perl line 6.
I'am using Fedora 17 and don't find the package named: libjson-rpc-perl. I've already installed the following packages:
perl-CGI-Application-Plugin-JSON.noarch 1.02- 5.fc17 fedora
perl-Catalyst-View-JSON.noarch 0.30-5.fc17 fedora
perl-JSON-Any.noarch 1.29-1.fc17 fedora
perl-JSON-Any-tests.noarch 1.29-1.fc17 fedora
perl-JSON-PP.noarch 2.27200-3.fc17 fedora
perl-JSON-Path.noarch 0.101-2.fc17 fedora
perl-JSON-RPC-Daemon.noarch 1.03-2.fc17 updates
perl-JSON-RPC-legacy.noarch 1.01-2.fc17 fedora
perl-JSON-RPC-legacy-server.noarch 1.01-2.fc17 fedora
perl-JSON-Util.noarch 0.05-3.fc17 fedora
perl-JSON-XS.x86_64 1:2.32-1.fc17 fedora
perl-JSON-XS-tests.x86_64 1:2.32-1.fc17 fedora
perl-JSON-tests.noarch 2.53-4.fc17 fedora
perl-MooseX-Types-JSON.noarch 0.02-7.fc17 fedora
perl-MooseX-Types-JSON-tests.noarch 0.02-7.fc17 fedora
perl-Test-CPAN-Meta-JSON.noarch 0.13-1.fc17 fedora
perl-Test-JSON.noarch 0.11-6.fc17 fedora
perl-Test-JSON-tests.noarch 0.11-6.fc17 fedora
I don't know what to do now ? Can you please advice ?
Thanks in advance,
in your code :
use JSON::RPC::Legacy::Client;
and also change:
my $client = new JSON::RPC::Legacy::Client;
Use CPAN to install JSON::RPC. It's usually simple procedure. There is also a tool somewhere that converts CPAN distributions into rpms, but you might find cpan easier to handle without additional conversion step.
In general, in Fedora (and anywhere else in the Red Hat world), if you don't know which package contains the module you need, you can run:
% yum install 'perl(Module::Name)'
In this case, that would be:
% yum install 'perl(JSON::RPC::Client)'
JSON::RPC::Client was provided by an older version of JSON-RPC. Version 1.00 of JSON-RPC broke backwards compatibility with previous releases and no longer includes that module. You'd have to install the older version to get this code to work (or update the code to use the new API). You can get JSON-RPC 0.96 (the last compatible version) here.
You can install the old version in a private location just for this code.

lwjgl + slick2d + jinput error on 64-bit linux

I am using Linux (Ubuntu 12.04) with 64-bit java 7 and Eclipse (Indigo).
On the game project we are using slick2d and along with it lwjgl. I was halted by the following errors.
(fixes explained in the answer)
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
java.lang.UnsatisfiedLinkError: no jinput-linux64 in java.library.path
Failed to open device (/dev/input/event8): Failed to open device /dev/input/event8
Versions:
Slick2D
Mon, 01 Oct 2012 09:54:11 +0100
Sun May 11 20:17:03 BST 2008
build=264
LWJGL (could be 2.8.5 already, but now this):
2.8.4
To fix this, follow the instructions provided in the 'slick2d' documentation
http://www.slick2d.org/wiki/index.php/Main_Page
This seems to be a real bug with slick2D/lwjgl on the versions that we are currently using. To fix this you can't use 64-bit java (with linux at least). Download the 32-bit java from Oracle web site and configure this to be your IDEs runtime environment (you may need to search for more help how to do this in your particular IDE)
This is purely related to permissions on linux. Go to '/dev/input' and change the folder permission 'sudo chmod 644 *' so that the process can simply read what's in there.
There didn't seem to be info on how to fix this problem whole together. Hope this helps some one else.
Download slick and copy needed libs (jinput-linux64, lwjgl, .dll & .so files) to your java.library.path
to get the java.library.path you can do so: System.out.println(System.getProperty("java.library.path"));

Jenkins plugins in jruby, can't get it to work

I've tried to get this to work on several operating systems (Windows 7, OS X and Ubuntu) and I'm about to give up on this.
I've followed the guide on https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+plugin+development+in+Ruby
On Windows 7, bundle fails until I add another "rescue" for Errno::EAGAIN in faster.rb.
When I run jpi server to test the plugins I get the following error:
[...]
INFO: Injecting JRuby into XStream
LoadError: no such file to load -- jenkins/plugin/runtime
require at org/jruby/RubyKernel.java:1038
(root) at < script >:1
2012-jan-26 09:17:31 jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading plugin ruby-prototype
hudson.util.IOException2: Failed to initialize
[...]
Is this a known issue? I found that some had similar problems last year in August, the answers suggests that this is now fixed.
Suggestions or a solution to this problem would be much appreciated.
// Jens
The support for windows is just poor at the moment and the plugin ruby-prototype is no longer maintained either. It seems like moving to a unix-based OS and trying out existing official ruby plugins from jenkins-ci.org is the best bet to start developing ruby plugins.