我从perl开始,希望在Ubuntu14.04上安装IDE 牧师。这个问题的答案表示我只需使用apt-get
sudo apt-get install padre我还试图用以下方式安装它:
sudo cpan Padre如所示,这里。
但是,当我运行padre时,它会给出以下错误:
DBD::SQLite::db selectall_arrayref failed: attempt to write a readonly database at (eval 1905) line 41.
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detached当我以根用户(sudo padre)的身份运行它时:
DBD::SQLite::db do failed: Safety level may not be changed inside a transaction at (eval 1905) line 37.
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detachedpadre --version向我展示:Perl Application Development and Refactoring Environment 1.00,我的perl版本为5.18.2。
在/usr/bin/padre脚本中,我看不到对SQLite数据库的任何引用。有人知道我怎么能解决这个问题吗?
发布于 2016-01-18 10:55:45
最后,我在这个错误报告中找到了解决方案。在文件Locker.pm (在我的系统中位于/usr/share/perl5/Padre中)中,应该更改以下函数(第102行):
sub db_increment {
my $self = shift;
unless ( $self->{db_depth}++ ) {
Padre::DB->begin;
# ...
Padre::DB->pragma( synchronous => 0 );
}
return;
}至:
sub db_increment {
my $self = shift;
unless ( $self->{db_depth}++ ) {
#...
Padre::DB->pragma( synchronous => 0 );
Padre::DB->begin;
}
return;
}即改变Padre::DB->pragma和Padre::DB->begin的顺序。
这允许我以根用户身份启动padre (sudo),为了解决这个问题,我必须更改Padre配置的所有者。我使用chown将权限更改为我的用户
sudo chown -R myuser:myuser /.local/share/.padre/https://stackoverflow.com/questions/34787579
复制相似问题